Topic "Only synchronize certain file types"

Author Message
[View user's profile]

Joined: 2015-06-05
Posts: 2
I need to synchronize files, both directions, between local and an FTP server. Thing is I only want .x and .y files taken into account. I.e. both locally and remotely, other files and directories containing only other files, shouldn't be touched.

I'm sure I need to use the Include and Exclude Masks, but find this section a bit confusing:

Both include and exclude part can be empty, denoting that everything is included or nothing is excluded, respectively. When include part is empty, masks starts with pipe straight away.

I'm thinking the following command should do what I want, but what does "nothing is excluded" mean? Does it mean what I think? If nothing is excluded, isn't everything included either way?

synchronize both -preview -transfer=binary -filemask=""*.x; *.y|""
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27106
Location: Prague, Czechia
Your mask is correct.

The trailing pipe (|) is not necessary.
[View user's profile]

Joined: 2015-06-05
Posts: 2
Thanks Smile

You can post new topics in this forum


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