ssCore.FTP.renameFile

Rename and/or move a file on the FTP server.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

existingFile - The name of an existing file on the FTP server to be renamed.

newFile - The new name of the file.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.FTP.renameFile( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.FTP.renameFile( paramsObject );


Notes:

The existingFile and newFile parameters can be relative to the current directory or absolute paths.

If the existing file and newfile parameters have different paths, a move as well as a rename will be performed. If you specify "/public/myfiles/readme.txt" as the existingFile and "/public_html/readme2.txt" as the newFile, then readme.txt will be renamed to readme2.txt and moved to the "/public/html" directory.

                

Examples:

ssCore.FTP.renameFile({existingFile:"file.jpg", newFile:"file001.jpg"});