spo folder rename
Renames a folder
Usage
m365 spo folder rename [options]
Options
-u, --webUrl <webUrl>The URL of the site where the folder to be renamed is located.
-f, --url <url>The server- or site-relative URL of the folder (including the folder).
-n, --name <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 isfull.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Examples
Renames a folder with a specific site-relative URL
m365 spo folder rename --webUrl https://contoso.sharepoint.com/sites/project-x --url '/Shared Documents/My Folder 1' --name 'My Folder 2'
Renames a folder with a specific server-relative URL
m365 spo folder rename --webUrl https://contoso.sharepoint.com/sites/project-x --url '/sites/project-x/Shared Documents/My Folder 1' --name 'My Folder 2'