Navigation:  Reference > Functions >

RenameFile()

Print this Topic Previous pageReturn to chapter overviewNext page

 

RENF(1,2)

 

PURPOSE

This function can be used to rename a file.  It will return a value indicating whether or not the renaming was successful.

 

PARTS

1 f/c/eRequired - The current file name, must include full path and extension.

 

2 f/c/eRequired - The new file name, must include full path and extension.

 

RETURN TYPE - L

If the rename operation is successful the function will return .T., if not, .F..

 

COMMENTS

You may move the file from one path to another by using the appropriate path values.

 

EXAMPLE

Define Fileok type L

fileok = RENF('oldfile.txt',Newfile.txt)

if fileok

msg 'Your file was renamed'

else

msg 'Could not rename your file it could be open.'

endif

 

 


Page url: http://www.cassoftware.com/tas/manual/renamefile().htm