From Xojo Documentation
The name of the FolderItem. Changing this name will change the name of the file or folder.
It will rename files if the user has permission to rename them, they are not in use, and it is not a folder or temporary file. The file must exist in order to be assigned a name.
Renaming fails if another file with same name exists already. In that case, please delete the existing file before renaming. In case of a duplicate name, the LastErrorCode property is set to 105.