FILE_RENAME

FILE_RENAME F1,F2

GIVES TO THE FILE F1 THE NEW NAME F2

  • Type: Command
  • Parameters: 2
  • Group: Files

ACTION

The command FILE_RENAME F1,F2 renames the file F1 in F2. F1 and F2 are absolute or relative names of file.

The absolute name is the entire name, related to the root of the file system.

The relative name is the name of the file related to the current directory (ex: "file.txt" or "/file.txt" or "\file.txt").

SYNTAX: FILE_RENAME F1,F2

  • F1 and F2 = absolute or relative names of the file.

USE

  • The command FILE_RENAME is used to change the name of a file.

ERROR

  • If file F1 does not exist.
  • If file F2 already exists.
  • If F1 or F2 is not a correct name of file.

EXAMPLE

rem rename the file "test.txt" into "test2.txt"

file_rename "test.txt","test2.txt"

SEE ALSO

FILE_DELETE

FILE_EXISTS()