ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Need help writing a script? Have any question about ScriptFTP?
How Stop an infinite loop?
Code: Select allWHILE("TRUE") $result=GETFILE("*.*") IF($result!="OK")                 PRINT("ERROR in GetFile, exiting")                 # Exit with error code 1                 EXIT(1)         ELSE                 PRINT("All files downloaded. Waiting 2 seconds")                 SLEEP(2)             END IF         DELETEFILE("*.*") END WHILE

Please
Hi,

Try:
Code: Select all$blnLoop=="TRUE" WHILE($blnLoop=="TRUE")  $result=GETFILE("*.*")  IF($result!="OK") PRINT("ERROR in GetFile, exiting") # Exit with error code 1 EXIT(1) ELSE PRINT("All files downloaded. Waiting 2 seconds") SLEEP(2) END IF $delresult=DELETEFILE("*.*") IF($result!="OK")  $blnLoop="FALSE" END IF END WHILE
If I'm following what you are trying to do properly that should change the conditional for the loop so that it stops executing.

Good luck -

-A