Renames a file or folder.
|
Syntax:
|
FileRename(origin,target)
|
Parameters:
|
origin: An alpha string that represents the file or folder to be renamed. target: An alpha string that represents the new name.
|
Returns:
|
Success returns TRUE. Failure returns FALSE.
|
Example:
|
FileRename('MAGIC.FILE','MAGIC.SAV') result: MAGIC.FILE is renamed MAGIC.SAV
|
Note:
|
-
In each parameter the string may include a path. If the path is omitted, Magic xpa assumes the current directory.
-
If the rename cannot be performed (e.g., the target file is on a different drive), the file will be copied to the target drive under the new name.
-
When the target is not mentioned, the project directory is taken as the target directory.
|
See also:
|
FileCopy,FileDelete, FileExist, FileInfo
How Do I Rename a File on Disk?
The Online and Rich Client Samples projects (program EL19 and REL19)
|