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,

What does "***** SYNC Error #23: Connection closed." mean ?

Regards,
Frank Huijbreghs
Hi Frank,

It means that the data connection between ScripFtp and the server has been unexpectedly closed. this is usually a firewall issue.To get further info use the following command on the top of your script and run it again:
FTP Script
  1. VERBOSE(ON)
Please, post here the output.
***** SYNC Error #24: Unknown Error 2.
Is the same connection problem error ?

I will let the script run in VERBOSE mode and publish the result later.
I get this error when SYNC large folder/filenames:
Downloading (local file not found) Word/FOV/Pensioen Mantel FOV VPL/Achmea/Pensioenreglement/Rapportage MSPC/2008/Rapportage 2 juli 2008/55 +reglement/Opmerkingen bij pensioenreglement 55+/Eerdere versies/39300000 IJsselstroom Reglement 55+ FWP naar FWP Definitief 24-06-2008 MS versie 1.DOC
***** SYNC Error #24: Unknown Error 2.
Here is the output with VERBOSE on:
226 Transfer complete.
Downloading    (local file not found)    Word/FOV/Pensioen Mantel FOV VPL/Achmea/Pensioenreglement/Rapportage MSPC/2008/Rapportage 2 juli 2008/55 +reglement/Opmerkingen bij pensioenreglement 55+/Eerdere versies/39300000 IJsselstroom Reglement 55+ FWP naar FWP Definitief 24-06-2008 MS versie 1.DOC
SIZE 39300000 IJsselstroom Reglement 55+ FWP naar FWP Definitief 24-06-2008 MS versie 1.DOC
213 198656
PASV
227 Entering Passive Mode (81,204,137,50,103,3).
Failed to open file '39300000 IJsselstroom Reglement 55+ FWP naar FWP Definitief 24-06-2008 MS versie 1.DOC.part'.
Het systeem kan het opgegeven pad niet vinden.

***** SYNC Error #24: Unknown Error 2.
Translated: "Het systeem kan het opgegeven pad niet vinden." -> "The system cannot find the specified path"
Hi Frank,

The "Unknown error" is not related to the "connection closed" error. It's because the file path is too long.

Windows cannot handle paths longer than 260 characters. There are some workarounds but it's a limitation of the operating system itself, not ScriptFTP. If you want a reference, you can find further information in the section "Maximum Path Length" of this article:
http://msdn.microsoft.com/en-us/library/aa365247.aspx

However, I think that ScriptFTP should show an error warning about this issue. It's not the first time an user face this problem in ScriptFTP.
Oké, thanx for your reply.

Is it possible to let the SYNC command ignore the error and continue the SYNC process ?

Regards,
Frank
Hi Frank,

Try adding the directory "Eerdere versies" to the download exclusion list:
FTP Script
  1. # Ignore every directory called Eerdere versies
  2. # in the download operations
  3. ADDEXCLUSION(DOWNLOAD,"Eerdere versies/")
Remember the "/" appending the directory name. It's used to indicate to ADDEXCLUSION that "Eerdere versies" is not a file. You can find further info and examples of ADDEXCLUSION at the documentation section of this web site.

There is another workaround. Separate one SYNC call in multiple SYNCs, to avoid the path length issue you should use LOCALCHDIR and CHDIR commands before calling each SYNC:
FTP Script
  1. # Change current remote directory to "long _path_here"
  2. # the directory must exist
  3. CHDIR("long_path_here")
  4.  
  5. # Change current remote directory to "long _path_here"
  6. # the directory must exist
  7. LOCALCHDIR("long_path_here")
  8.  
  9. SYNC("mylocalsubdir","myremotesubdir",DOWNLOAD,SUBDIRS)
  10.  
  11. # Change current remote directory to "long _path_here2"
  12. # the directory must exist
  13. CHDIR("long_path_here2")
  14.  
  15. # Change current remote directory to "long _path_here2"
  16. # the directory must exist
  17. LOCALCHDIR("long_path_here2")
  18.  
  19. SYNC("mylocalsubdir","myremotesubdir",DOWNLOAD,SUBDIRS)
  20.  
  21.  
  22. # .... And so on