Used to rename a file or a folder.

Note! If the destination folder is different from the original folder, the file or folder will be moved to the new location.


RENAME(string listName, string sourceFile, string destinationFile);

Example: to rename the file named helloworld.txt in document library Shared Documents to helloworld_old.txt:

CALL RENAME('Shared Documents', 'helloworld.txt', 'helloworld_old.txt');

Example: to rename the folder named Images in document library Shared Documents to Images_old:

CALL RENAME('Shared Documents', 'Images', 'Images_old');

Code examples

Rename document

using (var connection = new SharePointConnection(connectionString))
    using (var command = new SharePointCommand(@"CALL RENAME('Shared Documents', 'Images/bendsoft_backup.jpg', 'Images/bendsoft.jpg')", connection))

Skip Navigation Links.

Visa     MasterCard