FTPRENAMEFILE Function
Description
Renames a file from an FTP server.
Syntax
filecontents = FTPRENAMEFILE(ftpdomain,user,password,path,existing_filename,new_filename)
Parameters
The function has the following parameters:
Parameter | Description | |
---|---|---|
ftpdomain | The domain name of the FTP site. | |
user | A valid user of the FTP site | |
password | The password of the user | |
path | The location of the file being renamed. | |
existing_filename | The current name of the file being renamed | |
new_filename | The new filename. |
Returns
250 if successful, 503 if failure.
See Also
FTPDELFILE(), FTPGETFILE()
Example
declare function FTPRENAMEFILE, msg, utility ftpdomain = 'my.ftp.site.com' user = 'someone' password = 'a valid password' path = 'myFtpFiles' existing_filename = 'How To FTP' new_filename = 'How to Rename FTP files' message = FTPRENAMEFILE(ftpdomain,user,password,path,existing_filename,new_filename) if message = 250 else msg(@window,'Error in renaming file. Error Code: ';message) end