Cicode Programming Reference > Cicode Function Categories > File Functions Introduction > FileRename

FileRename

Renames a file.

Syntax

FileRename(Oldname, Newname)

Oldname:

The original name of the file.

Newname:

The new name of the file.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

FileCopy, FileDelete

Example

! Rename REPORT.TXT as REPORT.OLD.
FileRename("C:\Data\Report.Txt","C:\Data\Report.Old");

See Also

File Functions