Script automatic sync FTP always compare all the files

Advertisement

Young
Guest

Script automatic sync FTP always compare all the files

Each time i run synchronize script, it always compare all folders from my local dir to FTP dir, any ways to only compare files from 4days ago? The size is TB so it takes a very long time to sync.
option batch continue
option confirm off
open ftpserver
synchronize -filemask=">4D" local "mydir" "ftpdir" 
exit
it's not working, it still compares all of my files to ftp server

Reply with quote

Advertisement

Young
Guest

Update:
I have to use this now:
option batch continue
option confirm on
open ftpserver
get -neweronly "ftpdir/*>2D" "mydir\*"
exit
Should i change confirm on to off or not ? I want to skip to replacing existed files

Reply with quote

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

Re: Script automatic sync FTP always compare all the files

Young wrote:

Each time i run synchronize script, it always compare all folders from my local dir to FTP dir, any ways to only compare files from 4days ago? The size is TB so it takes a very long time to sync.
option batch continue
option confirm off
open ftpserver
synchronize -filemask=">4D" local "mydir" "ftpdir" 
exit
it's not working, it still compares all of my files to ftp server
Even if you specify a filter for the files, WinSCP still have to list all files to find what files are those matching the filter.

Reply with quote

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

Young wrote:

Update:
I have to use this now:
option batch continue
option confirm on
open ftpserver
get -neweronly "ftpdir/*>2D" "mydir\*"
exit
Should i change confirm on to off or not ? I want to skip to replacing existed files
The get command cannot skip existing files. The synchronize is the command to use. If the get would be skipping existing files, it would have to do exactly the same what the synchronize does.

Reply with quote

Advertisement

You can post new topics in this forum