Script

FTP

The professional tool to automate FTP, SFTP, FTPS

and schedule FTP batch jobs

MENU MENU
Post here if you experience file transfer problems or unexpected errors.
Hi there, been using scriptFTP for the last few years with SFTP and its very useful, so thankyou.

In one use of scriptFTP I sync a folder structure on a Windows machine to a Linux server.
FTP Script
  1. OPENHOST("abc.co.uk","user","pass")
  2. SYNC("c:\folder1","/www/vhosts/abc.co.uk/",UPLOAD_DELETE,SUBDIRS)
I have been having a problem where syncing stops and doesn't continue, an example log of final steps below:
FTP Script
  1. (ScriptFTP) SSH_FXP_STAT (2086, '/www/vhosts/abc.co.uk/folder1/11-16_submitted.pdf')
  2. [Server   ] SSH_FXP_STATUS (2086, 2, 'No such file')
  3. (ScriptFTP) SSH_FXP_REALPATH (2087, '/www/vhosts/abc.co.uk/')
  4. [Server   ] SSH_FXP_NAME (2087, 1 item)
  5. (ScriptFTP) SSH_FXP_STAT (2088, '/www/vhosts/abc.co.uk')
  6. [Server   ] SSH_FXP_ATTRS (2088)
  7. ····· SYNC Error #0
  8. ····· No such file; No such file.
The file appeared to be on the target server but on closer inspection, the filename had a single character changed to upper case (11-16_Submitted.pdf) from the local - Someone changed locally it post sync.

If I delete the offending file from the target server, the scriptFTP job will then run as expected.

I can also upload the file using filezilla no problems - the server allows both to be present - but not my current scriptftp job.

I understand that Windows is not case sensitive, and Linux is.

My question is, how can I get scriptftp to delete the target file or folder and upload the renamed local one? Am I missing any arguments in the SYNC command?

Currently my only workaround idea is a script that runs at midnight, deletes the whole tree allowing syncing to function if someone causes this problem by renaming a file after it has been uploaded.

Many thanks
Hello,

Thanks for reporting this and providing such a detailed information. Very helpful.

This is a bug. When ScriptFTP upload files it is case insensitive so "11-16_submitted.pdf" and "11-16_Submitted.pdf" must be considered the same file. Unfortunately I have tested it in the current version of ScriptFTP and it considers them as different files...

And after some research in the innards of ScriptFTP I have fixed it and uploaded the patched version.
You can download it from here:

http://www.ScriptFTP.com/beta

If you find anything else wrong please let me know.

Thanks a lot.
Thankyou for the prompt response and quick fix.

I've tried the new version and so far so good. Will keep an eye on it and let you know if there are any problems.

Once again many thanks for a great product.