Topic "How to synchronize only root and 1st subfolder only"

Author Message
solicom
[View user's profile]

Joined: 2013-02-16
Posts: 8
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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Something like this should work:
-filemask="*/;*.exe|/path_from_root/folder/*/*/*/"
You need to use an absolute path in the exclude mask.
_________________
Martin Prikryl
solicom
[View user's profile]

Joined: 2013-02-16
Posts: 8
prikryl 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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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.
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