How to execlude/compare files from synchronization?

Advertisement

Samer
Guest

How to execlude/compare files from synchronization?

Hallo,

I would realy like someone to check the below command.
option batch abort
option confirm off
open sftp://----------------------------------------------------------------------------------------------
synchronize local -criteria=size C:\ /
exit    

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!
[/code]

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: How to execlude/compare files from synchronization?

You have the 2) already.

Regarding the 3):
Use the -filemask switch:

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

See https://winscp.net/eng/docs/file_mask

Reply with quote

Advertisement

You can post new topics in this forum