Hi,
I'm very impressed with your product. So far my testing with the trial version has been extremely positive.
I do have one question.
I have a script, which repeats the following script 68 times to download backups of 68 hosting accounts. I'm in the process of using a batch file to pass the accounts in as parameters to stream line the script.
I have an account where some files get uploaded by my client and are unaccessible from ScriptFTP. It exits with a "550 Failed to open file." error. My currently script gets stuck in an infinite loop. I know I can break after so many attempts, but I'd like to know if I can check for the error type, and if it's a certain type, like 550, skip that file and continue.
Note: performance is an issue as I have 4-6GB of data to sync, and I'd like to accomplish this in a 20 hour window. I've been running the script for about 26 hours now, but I'm assuming once I've ran the script and it only has to download an occasional file which as been changed, it won't take nearly as long.
Thanks!
I'm very impressed with your product. So far my testing with the trial version has been extremely positive.
I do have one question.
I have a script, which repeats the following script 68 times to download backups of 68 hosting accounts. I'm in the process of using a batch file to pass the accounts in as parameters to stream line the script.
I have an account where some files get uploaded by my client and are unaccessible from ScriptFTP. It exits with a "550 Failed to open file." error. My currently script gets stuck in an infinite loop. I know I can break after so many attempts, but I'd like to know if I can check for the error type, and if it's a certain type, like 550, skip that file and continue.
Note: performance is an issue as I have 4-6GB of data to sync, and I'd like to accomplish this in a 20 hour window. I've been running the script for about 26 hours now, but I'm assuming once I've ran the script and it only has to download an occasional file which as been changed, it won't take nearly as long.
Thanks!
Code: Select all
$localdir = "localdirectoryname"
$username="ftpusername"
$webserver="ftpserveraddress"
$mypassword="ftppassword"
$attempts=0
$result = ""
WHILE($result!="OK")
  $attempts=$attempts+1
  PRINT($localdir." Attempt #".$attempts)
  $result=OPENHOST($webserver,$username,$mypassword)
  SLEEP(5)
  IF($result=="OK")
    $attempts=0
    $result=SYNC("D:\backup\".$localdir,"/",DOWNLOAD,"*.*", SUBDIRS)
  ELSE
    SLEEP(10)
    IF($attempts==5)
      EXIT(1)
    END IF
  END IF
END WHILE
CLOSEHOST
SLEEP(10)