:RenameFile()
Class
Syntax
:RenameFile( cOldFile, cNewFile, [hSession] ) -> lSuccess
Parameters
|
|
cOldFile |
String that specifies the name of the remote file to rename. The file pathing and name conventions must be that of the remote host. |
|
|
cNewFile |
String the specifies the new name for the remote file. The file pathing and name conventions must be that of the remote host. |
|
|
hSession |
Optional: If hSession is not passed, the value in :Session will be used |
Return
Logical indicating Success.
Returns .T. if the operation succeeds, otherwise returns .F.
To get further error information see :nErr and :cErr
To see the remote server's response, see :GetResultCode() and :GetResultString().
Description
The :RenameFile() method renames the specified file on the remote server.
The file must exist, and the current user must have the appropriate permission to change the file name.
This method causes two separate commands to be sent to the remote server, RNFR and RNTO.
If either command fails, the method will fail and return an error code.
See Also
:GetFile(), :PutFile(), :RenameFile()