The #FTPTimeout system variable specifies the number of seconds which WinTask should wait before reporting an execution error when it tries to execute a FTP function.
if a FTP function execution is not finished after #FTPTimeout seconds, Error Handling mechanism is used.
The default value for #FTPTimeout is 30 seconds.
If #FTPTimeout is set to 0, WinTask waits forever.
#FTPTimeout = 5
'This script downloads wintaskdemo.exe from www.wintask.com FTP server (the password is not correct on purpose!).
#IgnoreErrors=1 'No error is displayed if an execution error occurs
#FTPTimeout=120 'Allow a maximum of 120 seconds for FTP functions execution
FtpConnect("www.wintask.com","ftp","PMJN1563hSWHXFj/CD") 'Connect to the FTP server
ret=FTPGetFile("c:\wttest","/wintaskdemo.exe") ' Download wintaskdemo.exe from the FTP server and save it under c:\wttest
' Test the return code
if ret=0 then
msgbox("Increase the timeout")
FtpDisconnect() ' Terminates the FTP connection