FileOps.$rename()

Function groupExecute on clientPlatform(s)
FileOpsNOAll

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'