os.Path.rename

Renames a file or a directory.

Syntax

os.Path.rename(
   oldname STRING,
   newname STRING )
  RETURNING result INTEGER
  1. oldname is the current name of the file or directory to be renamed.
  2. newname is the new name to assign to the file or directory.

Usage

The function returns TRUE if the file or directory has been successfully renamed, FALSE otherwise.

On UNIX™ platforms, you can rename/move files and directories.

On Microsoft™ Windows™ platforms only files can be renamed/moved. However, on Windows you can move files across disks and directories.