FTPName
FTP function.
The FTPName function renames one or several files in the FTP server.
Syntax
FTPName(<old_filename>,<new_filename>)
or
ret=FTPName(<old_filename>,<new_filename>)Parameters
<old_filename>, string, name of the file(s) to be renamed. Wildcard characters are permitted.
<new_filename>, string, new name of the file(s). Wildcard characters are permitted.
Return value
Ret, numeric return code. The return code is 0 when the file(s) has been successfully renamed. The non zero possible error codes for FTP errors are listed in FTP functions error codes topic. The non zero possible error codes due to a file error on the PC (file not found for example) are listed in File management functions error codes topic. During #FTPTimeout seconds, the function tries to rename the file(s) and after this timeout, the standard error management is used.
Remarks
FTPName can be used to move a file within a folder, for example Name("\todelete\file1.txt","\todelete\file2.txt").
Example
FtpConnect("www.wintask.com","ftp","MX/WH05CZE3h") ' connection to the FTP server www.wintask.com (fake credentials!)
FtpName("/upgrades/todelete/*.jpg","/upgrades/images/*.gif") ' renames all the *.jpg files stored in upgrades/todelete folder.
FtpDisconnect() ' Terminates the FTP connection