The folder.rename( ) method renames the folder with the name you passed in newName and returns the renamed Folder object.
The newName parameter must comply with naming rules (e.g., it must not contain characters such as ":", "/", etc.), otherwise an error is returned. If a folder with the same name already exists, an error is returned.
Returned object
The method returns the renamed Folder object.