Function FRename() Foundation
Changes the name of a file.
FRename( <cOldName>, <cNewName> ) --> nSuccess
When the file was successfully renamed by FRename(), the function returns the value 0. If the operation fails, the return value is -1 and FError() can be used to retrieve the error code.
The low level file function FRename() renames a file. The file is renamed only if <cOldFile> and <cNewFile> have valid file names. A successful operation is identified by the return value 0. If the operation fails, the return value is -1 and FError() can be used to determine the file error that occurred.
Low level file functions do not use either the path set with SET PATH or specified with SET DEFAULT. Therefore <cOldName> and <cNewName> must be complete file names with drive and path specified. When the file names contain no drive or path, the current directory is searched for <cOldName>.
If the target path is different from the initial path, the file is moved to the target path. If a file already exists with the name <cNewName>, the operation is terminated and FRename() returns the value -1.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.