Topic "How to execlude/compare files from synchronization?"

Author Message



I would realy like someone to check the below command.

option batch abort
option confirm off
open sftp://----------------------------------------------------------------------------------------------
synchronize local -criteria=size C:\ /

I want to make an automated synchronization through TASK Schedular every 5 minutes only from the FTP Server to a local machine. The below are what I'm trying to achive(so far I only managed to do the first point -.-)

1- Download all File to the local machin.

2- If the files are already exist in the local machine, compare the size of both files and in case there is a differance, then download it from the FTP server to the local machin again.#
3- Execlude some files to be downloaded: for example: ( tmp, intern, and all ".DAV" directories)

Could someone preview the code and tell me how to add the 2nd and the 3rd point? I will be really be gratefull.

Thank you!
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24759
Location: Prague, Czechia
You have the 2) already.

Regarding the 3):
Use the -filemask switch:

synchronize local -criteria=size -filemask="|tmp/;intern/;.DAV" C:\ /



Ty it's working perfectly.

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License