Synchronize folder - Only new files

Advertisement

Jente
Joined:
Posts:
1
Location:
Belgium

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!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

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.

Reply with quote

Advertisement

You can post new topics in this forum