FileOps.$rename()

Function group Execute on client Platform(s)
FileOps NO All

Syntax

FileOps.$rename(cOldname,cNewname)

Description

Renames the file or folder named cOldname to cNewname.

The function returns an error code, or zero if successful: see the FileOps function error codes.

Example

Do FileOps.$rename('c:\omnis\libs','c:\omnis\examples') Returns lError
; renames the 'libs' folder to 'examples'


Do FileOps.$changeworkingdir('c:\omnis\datafile\odbc') Returns lError
Do FileOps.$rename('odbc.txt','readme.txt') Returns lError
; switches to the 'c:\omnis\datafile\odbc' folder and renames 'odbc.txt' to 'readme.txt'