Topic "FileMask to exclude root directory files"

Author Message
Pascal

Guest


Hi,

I can not find any FileMask pattern to exclude from synchronisation all files within root directory.

Currently I have fro exemple

c:\RootDir\text01.txt
c:\RootDir\text02.txt
c:\RootDir\MyFolderActive01\text11.txt
c:\RootDir\MyFolderActive01\text11.log
c:\RootDir\MyFolderActive02\text21.txt
c:\RootDir\MyFolderBackup\text31.txt

And I want to synchronise only Active folder content but not .log file
<FileMask>MyFolderActive01/;MyFolderActive02/|*.log</FileMask>

It works except that winscp synchronized also
c:\RootDir\text01.txt
c:\RootDir\text02.txt
Advertisements
Guest




In addition, the log file

> 2014-10-09 10:08:16.508 Script: synchronize remote -delete -mirror -nopermissions -preservetime -transfer="binary" -filemask="MyFolderActive01/;MyFolderActive02/|*.log" -resumesupport="on" -criteria="time,size" -- "c:\RootDir" "_SynchroRoot"
< 2014-10-09 10:08:16.509 Script: Comparing...
. 2014-10-09 10:08:16.509 Collecting synchronization list for local directory 'c:\RootDir' and remote directory '_SynchroRoot', mode = Remote, params = 0x1003 (Delete, NoConfirmation, Mirror)
. 2014-10-09 10:08:16.509 Local file 'c:\RootDir\.' [2014-10-09T08:05:12.015Z] [0] excluded from synchronization
. 2014-10-09 10:08:16.509 Local file 'c:\RootDir\..' [2014-10-09T08:05:12.015Z] [0] excluded from synchronization
. 2014-10-09 10:08:16.509 Local file 'c:\RootDir\MyFolderActive01' [2014-10-09T08:08:08.891Z] [0] included to synchronization
. 2014-10-09 10:08:16.509 Local file 'c:\RootDir\MyFolderActive02' [2014-10-09T08:08:08.891Z] [0] included to synchronization
. 2014-10-09 10:08:16.509 Local file 'c:\RootDir\MyFolderBackup' [2014-08-21T12:56:57.530Z] [0] excluded from synchronization
. 2014-10-09 10:08:16.510 Local file 'c:\RootDir\text01.txt' [2014-10-09T08:07:07.070Z] [6] included to synchronization
. 2014-10-09 10:08:16.510 Local file 'c:\RootDir\text02.txt' [2014-10-09T08:07:07.070Z] [6] included to synchronization
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
You can use -filemask="MyFolderActive*/|*.log;c:\RootDir\*.txt"
See https://winscp.net/eng/docs/file_mask#path_mask
_________________
Martin Prikryl
Guest




I have already find this filemask but trying to make it root folder location independant...

I can refer 'RootDir' but want to have a single filemask anywhere my tool is copy (no need to change it everytime I copy it)

Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
You cannot have a file mask relative to the "root" of transfer.
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