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.
--url <url>
The server- or site-relative decoded 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 isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs 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'
Response
The command won't return a response on success.