FolderItem.Name
From Xojo Documentation
Property (As String )
aFolderItem.Name = newStringValue
or
StringValue = aFolderItem.Name
Supported for all project types and targets.
or
StringValue = aFolderItem.Name
Supported for all project types and targets.
The name of the FolderItem. Changing this name will change the name of the file or folder.
Notes
A file can be renamed if the user has the appropriate permissions and the file is not in use. You should avoid renaming temporary folder or files as that behavior can vary by OS.
A file must exist in order to be renamed.
Renaming fails if another file with same name exists already. In that case, delete the existing file before renaming.
If renaming the file fails for any reason, an IOException will occur.