OSRENAME() |
|
|
The OSRENAME() function renames an operating system file or directory.
Format
OSRENAME(old.name, new.name)
where
The OSRENAME() function renames operating system item old.name to new.name. The items do not need to be in the same directory but, on Windows, must be on the same drive partition or, on Linux, must be in the same file system.
The function returns True if successful, False if it fails. The STATUS() function can be used to determine the cause of failure.
OK = OSRENAME(OLD.FNAME, NEW.FNAME) IF NOT(OK) THEN DISPLAY 'Error ' : STATUS() : ' renaming file'
The above code fragment attempts to rename a file. If this fails, it displays an error message. |