Topic "Filemask not working on synchronize"

Author Message
MisterDaniel

Guest


Hello,

I am trying to get synchronize to ignore files in the subdirectories (e.g.: "Text Files/Archive/file1.txt"), but it's not working so I'm guessing something is wrong with my code. Could you please advise me? Thanks!

Code:
open profile1
option transfer automatic
synchronize local W:\directory1 "Text Files" -filemask="*/"
close
open profile2
option transfer automatic
synchronize remote W:\directory1 "Files - Inbound" -filemask="*/"
close
exit
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Your mask is include mask, what basically means that it does not do anything, as the directories are included by default. To turn it to exclude mask, prepend it with pipe symbol:
Code:
synchronize local W:\directory1 "Text Files" -filemask="|*/"

See also https://winscp.net/eng/docs/file_mask
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