Question: Have some data stored in different directory paths in databricks file system. Need to rename some folders. Is it possible to rename folders in DBFS? If so, what's the command?

Answer: 
You can use `mv` with `%fs` magic, or `dbutils.fs` to do this. This command is used for renaming and/or moving files and directories

`%fs mv -r /path/to/folder /path/to/new_folder_name`

the `-r` is to do recursive move with directories.

It's documented in the [dbutils](https://docs.databricks.com/_static/notebooks/dbutils.html). There is also more info [here](https://docs.databricks.com/data/databricks-file-system.html#dbfs-and-local-driver-node-paths).
Use this. Just replace the path with your actual path.

```
old_name = r"dbfs:/FileStore/tables/PM/TC/ROBERTA"
new_name = r"dbfs:/FileStore/tables/PM/TC/BERT"

dbutils.fs.mv(old_name, new_name, True)

```