SETTIMEOUT Set the maximum number of seconds that ScriptFTP waits for a server response
- seconds: A number that indicates the amount of seconds.
Default timeout value is set to 45 seconds.
This command always returns “OK”.
# Set the timeout value to 90 seconds SETTIMEOUT(90) # This is a label. It marks a position in the script :start # Connect to FTP server. The connection with this server is very bad. OPENHOST("ftp.badserver.com","myusername","mypassword") # Download asd.zip $result=GETFILE("asd.zip") # If an error is got during the file download # check if the connection is still alive, if not reconnect IF($result!="OK" AND ISCONNECTED=="FALSE") GOTO :start END IF # Close the connection CLOSEHOST