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.
Post here if you experience file transfer problems or unexpected errors.
Hi,

I have been wrecking my head to figure out why I am getting an error #17502 on my script when I am using a SYNC command to download some files. I have spoken to the technician that handles the FTP server I am downloading from and he tells me there have been no changes of policies written for the server. Following is my script and I have attached the log file I get every time the script is run. Has anyone experience this kind of issue and is there a way to correct it??
FTP Script
  1. # Log output to E:\Scripts\Download_DB_log.txt
  2. LOGTO("E:\Scripts\Download_DB_log.txt")
  3.  
  4. VERBOSE(ON)
  5.  
  6. # Connect to Stingray’s FTP as kainsurance
  7. $result=OPENHOST("139.146.xx.xx","kainsurance","********")
  8.  
  9. # If OPENHOST failed stop the script
  10. IF($result!="OK")
  11.     STOP
  12.  
  13. # Set the file mode to BINARY
  14. $result=SETTYPE(BINARY)
  15.  
  16. # If SETTYPE failed stop the script
  17. IF($result!="OK")
  18.     STOP
  19.  
  20. #TEsting this command in case the prob is with the script
  21. SYNC("Z:\","/KAI_transfer",DOWNLOAD_DELETE, "*.rar")
  22.  
  23. # Close the connection
  24. $result=CLOSEHOST
  25.  
Attachments
This is the log file from the script in the post.
(3.72KiB)Downloaded 390 times