Rename an Item
Applies To: Windows Server 2012 Essentials
Changes the name of an existing item.
URI Template
POST services/builtin/FileOperationService.svc/item/rename?newname={name}&path={path}
{name}
The new name of the item.
{path}
A network path that begins with the server name, in the format /ServerName/FolderPath[/FileName], which ends with the current name of the item to be renamed.
Sample Request
POST https://www.contoso.com/services/builtin/FileOperationService.svc/item/rename?newname=123mike.txt&path=servername/Company/mike.txt.txt HTTP/1.1
Accept: application/xml
Cookie: ASP.NET_SessionId=********************
Canary: *********************
Host: domainname
Content-Length: 0
Sample Response
HTTP/1.1 200 OK
Error Codes
Error Code | Error Message |
---|---|
400 | The path is too long or has unsupported characters (such as *\|"<> ). |
401 | Access is denied to the requested resource. |
404 | The path does not exist. |
409 | An item already exists with the requested new name. |