Mirror Sync - Create a Folder but Don't Copy Files into It?

Get help for specific problems
User avatar
Posts: 143
Joined: 8 Mar 2017

Radish

I have the following folder in my exclude list for a mirror sync (one-way):

\PORTABLES\SomeProgram\cacheV3\groups\*

In setting that up I was hoping that on doing the sync the folder "groups" would be copied/created on the right-hand side - but the files in the folder would not be copied over. However, when I try this as above I find that the folder doesn't get copied/created (to the right-hand side). I've tried tinkering with the rule but I can't get it to work the way I want it to work.

So, question is, how do I get FreeFileSync to copy/create the folder to the right-hand side but not copy the files inside the folder? What should my exclude rule look like?
User avatar
Posts: 2290
Joined: 22 Aug 2012

Plerry

FFS only creates (non pre-existing) folders it needs to copy files into.
If you exclude all content of a given folder, FFS will not create that folder.
User avatar
Posts: 143
Joined: 8 Mar 2017

Radish

Thanks very much for the response, Plerry.

I'm disappointed to find that FFS won't create what would effectively be an empty folder on the right-side. That said, I'm relieved to see that the 'problem' wasn't caused by me writing a naff exclude filter.

I've got round this by putting a small 'dummy' txt file in the folder and writing an exclude filter that excludes all files in the folder I don't want to sync except my 'dummy' file. The dummy file forces the creation of the "groups" folder - and dumps the dummy file in it.

Thanks again. :-)
User avatar
Site Admin
Posts: 7056
Joined: 9 Dec 2007

Zenju

FFS only creates (non pre-existing) folders it needs to copy files into.
If you exclude all content of a given folder, FFS will not create that folder. Plerry, 19 Sep 2017, 12:26
Not quite. FreeFileSync treats files and folders separately. The reason why the folder is not created is because the filter expression, \PORTABLES\SomeProgram\cacheV3\groups\*, excludes the "groups" folder as well.

Therefore, one solution would be to modify the filter so that it only excludes the contained files/folders, e.g. like so:
\PORTABLES\SomeProgram\cacheV3\groups\?*
PS: @Plerry: Thanks a lot for answering so many support questions! It's great to see them addressed so that I can focus more on bugs and improving the software.
User avatar
Site Admin
Posts: 7056
Joined: 9 Dec 2007

Zenju

PPS: It looks like the filter syntax should be adapted to work as expected - as long as there's no major breakage - and have "folder" mean "folder + contained items" and "folder/*" mean "only contained items".
User avatar
Posts: 143
Joined: 8 Mar 2017

Radish

Thanks, Zenju. Tested and works as you suggest. Out goes my dummy file - Yippee!

I'd second your view on Plerry's dogged and quick responses to forum questions - at least he answers mine and with great patience when required. Great asset to the forum.