Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Synchronize folder - Only new files

Please attach a complete session log files both from GUI and script. Ideally on a small set of test files (what you seem to do already).
Maybe you resolve the problem yourself, if you compare the logs.
Jente

Synchronize folder - Only new files

Hello,

I'm trying to upload all my new files on my local folder to my remote (FTP) folder. I Want to run this script every night, so I when I get back I want all my new files in my FTP folder (including the old files that where already there). It's working great BUT it always start synchronizing everything again! So the files that are already in the remote location are being transfered again :/.

This is my script:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" /console /script="C:\Documents and Settings\Restore\Desktop\BackupSYNC\SyncScript.txt" /log="C:\Documents and Settings\Restore\Desktop\BackupSYNC\log.log"


open ftp://USER:PASSWORD@FTP-LOCATION

synchronize remote -criteria=none D:\Backup\TEST /folder/TEST
close
exit

I've also tried it without the -criteria option

Example:
In my local folder I've got File1, File2 and File3. On my remote folder I've got File1 en File2. At night, I want to synchronize, so WinSCP has to upload File3 to the remote folder. It does this, but File1 and File2 are also uploaded again.

Where is this going wrong?

EDIT: I've tried it with the GUI and it's working fine there, so my guess is that i'm missing something in my command..

Thank you!