Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Mcsnoogins

Re: Filemasks

mcsnoogins wrote:

McSnoogins wrote:

I'm still a bit mixed up with the new file masks, can someone translate this for me please?

I used to use
option exclude c:\data\software

I've tried replacing it with
synchronize -filemask="|c:\data\software" remote -criteria=Both C:\Data\Software /Data/Software

But it seems to synchronize the data folder regardless. Can you show me what i should be using please?



Last line should be "But it seems to synchronize the Software folder regardless"




Bit of trial and error resulted in the following answer:

synchronize remote -criteria=Both -filemask="| Software/" C:\Data\ /Data/
Now synchronizing all files and folders but excluding the folder c:\data\Software
mcsnoogins

Re: Filemasks

McSnoogins wrote:

I'm still a bit mixed up with the new file masks, can someone translate this for me please?

I used to use
option exclude c:\data\software

I've tried replacing it with
synchronize -filemask="|c:\data\software" remote -criteria=Both C:\Data\Software /Data/Software

But it seems to synchronize the data folder regardless. Can you show me what i should be using please?



Last line should be "But it seems to synchronize the Software folder regardless"
McSnoogins

Filemasks

I'm still a bit mixed up with the new file masks, can someone translate this for me please?

I used to use
option exclude c:\data\software

I've tried replacing it with
synchronize -filemask="|c:\data\software" remote -criteria=Both C:\Data\Software /Data/Software

But it seems to synchronize the data folder regardless. Can you show me what i should be using please?
guestuser

nevermind wrong version

i just updated to newest version, works great now!
guestuser

Exclude current directory not working

I am trying to exclude the current directory with: -filepath=|.\*
However, it is not excluding it... :?
ldsang

Semicolons, that was my problem. One of the perils of using search is getting info on depreciated commands. Thanks!
martin

Re: Problem with Excluding directories

1) "option exclude exclude_mask" is deprecated command, use "synchronize -filemask=|exclude_mask" instead.

2) Every "option exclude" command overwrites previous value. You need to set all masks at once by separating whem with semicolon. But of course, use the -filemask.

See example:
https://winscp.net/eng/docs/scriptcommand_synchronize#examples
And documentation:
https://winscp.net/eng/docs/file_mask

And of course, make sure you are using the latest version of WinSCP.
ldsang

Problem with Excluding directories

Hello all. I've been trying to get WinSCP to exclude some directories from sync but have had some odd issues. Here's my basic script (run from a batch file):

option batch on

option confirm off
option transfer binary
option exclude "M:\mypath\localvars\*"
option exclude "M:\mypath\src\*"
option exclude "M:\mypath\obj\*"
open server:pass@99.99.99.99
synchronize remote M:\local\path /remote/path
exit


The basic sync works, but it also completely syncs the "src" dir. Odd thing is it doesn't sync the "obj" dir. Also, it syncs 1 file in the "localvars" dir, but doesn't sync the rest of the files in that dir. I noticed this because I just put an additional file into that dir that I need different on my local server and the remote. There are other files that need to be different as well, but only 1 file in that dir is synced with my local server. Any ideas on why that script I posted would exhibit the behavior I've described?[/code]