xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

RenameFile()

Renames a file and handles errors.

Syntax

RenameFile( <cOldFile>, <cNewFile> ) --> nErrorCode

Arguments

<cOldFile>
This is a character string holding the name of the file to rename. It must include path and file extension. The path can be omitted from <cOldFile> when the file resides in the current directory.
<cNewFile>
This is a character string with the new file name including file extension. Drive and/or path are optional.

Return

The function returns zero on success or a numeric error code on failure.

Info

See also:DeleteFile(), FileMove()
Category: CT:DiskUtil , File functions
Source:ct\diskutil.prg
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe