FTPExistFile
FTP function.
The FTPExistFile function checks if the specified FTP filename exists or not.
Syntax
ret=FTPExistFile(<FTP_filename>)
Parameter
<FTP_filename> : string, name of the FTP file to check the existence.
Return value
Ret, numeric return code. The return code is 1 if <FTP_filename> exists, 0 if not. During #FTPTimeout seconds, the function tries to check the existence of the specified file. After this timeout, the script executes the next line whatever value for #IgnoreErrors (script execution does not stop even if a FTP error is returned).
See also
Example
FtpConnect("www.wintask.com","ftp","MX/WH05CZE3h") ' connection to the FTP server www.wintask.com (fake credentials!)
ret=FtpExistFile("/todelete/test.jpg") ' ret returns 1 if the file test.jpg exists in the FTP folder /todelete
If ret = 1 then
FtpKill("/todelete/test.jpg") ' deletes the FTP file if it existsEndIf
FtpDisconnect() ' Terminates the FTP connection