Discuss this help topic in SecureBlackbox Forum

Clouds: Rename folder

To rename a folder use TElOneDriveDataStorageObject.Rename() method of the folder object, which you want to rename. Pass the new name as a parameter. If a file or a folder with this name already exists, EElOneDriveServerError exception with "resource_already_exists" code is thrown.


// get an object for the folder to be renamed
TElOneDriveFolder folder = storage.AcquireObject(@"...") as TElOneDriveFolder;
Console.WriteLine("Folder: {0}", folder.Name);

// actually, rename the folder
folder.Rename("New Folder Name");
Console.WriteLine("Renamed: {0}", folder.Name);

// don't forget to release the object

How To articles about OneDrive cloud

Discuss this help topic in SecureBlackbox Forum