file_rename

From ENIGMA

Jump to: navigation, search


Notation

file_rename(oldname, newname)

Description

Renames the given file.

Parameters

  • oldname: The name of the file to rename.
  • newname: The desired new name for the file.

Note: This function currently uses Windows API's MoveFile function. Because of this, you must specify the full path for both parameters. (This also means you can use this function to move files)

Return Values

Returns 1 if successful, 0 otherwise.

Example Call

file_rename('d:/really.txt', 'd:/awesome.txt');
Personal tools