Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

martin

I'm not sure I follow. You need to exclude the dirD files you do not want to transfer.
pegasus711

But that means I will have to be very explicit with my include mask right? Which means I will require to include all upper level directories at the very least (I want to include the subdirectories) and the files as well.

So given the directory tree like I have, how will it look?
martin

Re: include only 1 file from excluded directory in sync

See https://winscp.net/eng/docs/file_mask#include_exclude
Exclude mask takes precedence over include mask.

So if you want to include some files from a folder only, you have to explicitly exclude those that you do not want to include.
pegasus711

include only 1 file from excluded directory in sync

Hello
what I have looks like this
\dirA, <-- include
\dirB, <-- include
\dirC, <-- include
\dirD, <-- include
\dirE, <-- exclude
\_out, <-- exclude
\.git, <-- exclude
.gitignore <-- exclude
.project <-- exclude
.sln <-- exclude
and a bunch of hidden files that I want to exlude

however I want to include only 1 file inside dirD which is Config.json aka dirD\Config.json

I've used the GUI to configure this which looks like this:
dirD/Config.json | *.tgz; *.swo; *.swp; *.7z; *.*~; *.sln; *.bat; *.vcxproj; *.dll; *.git*; .cproject; .project; .git/; .build/; .svn/; _out/; .rmk/; dirD/; .gitignore

what it is now doing is it is also excluding directories that I want to include like directories A,B,C etc (while only checking on dirD/Config.json). When I leave my include section blank and fill up only the exclude sections, it works but then it excludes the entire dirD. Is there a way to tell WinSCP that I want to only include Config.json from dirD while keeping everything else the same?

UPDATE 1:
I've tried this but it doesn't seem to work as well:
dirD/Config.json; */ | *.tgz; *.swo; *.swp; *.7z; *.*~; *.sln; *.bat; *.vcxproj; *.dll; *.git*; .cproject; .project; .git/; .build/; .svn/; _out/; .rmk/; dirD/