Topic "Script automatic sync FTP always compare all the files"

Author Message
Young

Guest


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.
Code:
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
Advertisements
Young

Guest


Update:
I have to use this now:
Code:

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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
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.
Code:
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Young wrote:
Update:
I have to use this now:
Code:

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.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License