Rename
Description: | Renames an existing file. |
Returns: | Nothing |
Usage: | Script Only. |
Function Groups: | File I/O |
Related to: | GetFileAttribs | SetFileAttribs |
Format: | Rename(OldName, NewName) |
Parameters: |
OldName |
Required. Any text expression for the current name of the file to be changed. A known path Known Path Aliases for File-Related Functions may be provided in the form, :{KnownPathAlias}. |
NewName |
Required. Any text expression for the new name that the file is to be changed to. A known path alias may be provided in the form, :{KnownPathAlias}. |
Comments: | This statement will rename the file regardless of its attributes and the attributes will not be changed. If the file to be renamed does not exist, a file will not be created. |
Example:
Rename(Concat(appPath, "TestMod.SRC"), Concat(appPath, "Test1.SRC"));
This statement changes the name of a file from "TestMod.SRC" to "Test1.SRC".