Skip to content

spo folder rename

Renames a folder


m365 spo folder rename [options]


-u, --webUrl <webUrl>
The URL of the site where the folder to be renamed is located
-f, --url <url>
Site-relative URL of the folder (including the folder)
-n, --name
New name for the target folder
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is full.
--query [query]
JMESPath query string. See for more information and examples
-o, --output [output]
Output type. json,text,csv,md. Default json
Runs command with verbose logging
Runs command with debug logging


Renames a folder with site-relative URL /Shared Documents/My Folder 1 located in site

m365 spo folder rename --webUrl --url '/Shared Documents/My Folder 1' --name 'My Folder 2'