file_rename(oldname, newname)
Jump to navigation
Jump to search
Description
Renames the given file to the new name.
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)
Parameters
Parameter | Data Type | Description |
---|---|---|
oldname | string | The name of the file to rename. |
newname | string | The desired new name for the file. |
Return Values
integer: Returns whether the renaming was successful or not.
Example Call
// example usage of the function
file_rename("d:/really.txt", "d:/awesome.txt");