Discuss this help topic in SecureBlackbox Forum

Clouds: Rename file

To rename a file use TElBoxFile.Rename() method of the file object, which you want to rename. Pass the new name as a parameter. If the folder or file with such name already exists, EElBoxServerError exception with "item_name_in_use" will be thrown.

C#:


// get an object for the folder to be renamed
TElBoxFile file = storage.AcquireFile(@"...");
Console.WriteLine("Original: {0}", file.Name);

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

// don't forget to release the object
file.Release();

How To articles about Box.com cloud

Discuss this help topic in SecureBlackbox Forum