How to synchronize only root and 1st subfolder only

Advertisement

solicom
Joined:
Posts:
8

How to synchronize only root and 1st subfolder only

I want to synchronize all .EXE files into my local directory but only from some folders of my FTP directory. I want to exclude all second-level or more subdirectories.
My FTP has FOLDER/SUBFOLDER1/SUBFOLDER2/SUBFOLDER3/subfolder4, and I just want to get .EXE files from FOLDER/SUBFOLDER1/subfolder2

Here is my command line:

synchronize local -filemask="*/;*.exe;" D:\fsdash\bck /folder/subfolder1/subfolder2

My results are:

using above command line I get all .EXE files from any folder and subfolder from my FTP to my local.

using: winscp513

THX

Reply with quote

Advertisement

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

Re: How to synchronize only root and 1st subfolder only

Something like this should work:
-filemask="*/;*.exe|/path_from_root/folder/*/*/*/"
You need to use an absolute path in the exclude mask.

Reply with quote

solicom
Joined:
Posts:
8

Re: How to synchronize only root and 1st subfolder only

martin wrote:

Something like this should work:
-filemask="*/;*.exe|/path_from_root/folder/*/*/*/"
You need to use an absolute path in the exclude mask.


Do you mean add path_from_root from my local or from my Remote FTP?
I have current code:

synchronize local -filemask="*/;*.exe|/path_from_root/folder/*/*/*/" D:\fsdash\diags\SYNC\temp /diags/Temp/Magellan

Reply with quote

martin
Site Admin
martin avatar

Re: How to synchronize only root and 1st subfolder only

solicom wrote:

Do you mean add path_from_root from my local or from my Remote FTP?
Source path, so in your case the remote directory. Though, it does not hurt to add the corresponding local path too.

Reply with quote

Advertisement

You can post new topics in this forum