You can use the CopyTo method to rename the destination file.
The AbstractFile passed as a parameter is the destination file, therefore if you call CopyTo on a file called one.txt and copy it to two.txt, the contents of the file will be the same but the name of the file will have changed.
If you want to rename the file on disk permanently, then you will need to create a reference to a DiskFile object and change the Name propert
Imported from legacy forums. Posted by Xceed admin (had 640 views)