Filter Exceptions not working

Get help for specific problems
Posts: 4
Joined: 30 May 2017

pecosdave

I use this to migrate and backup user accounts, and generally it does a great job - I need to make an exclusion with an exceptions that rarely matters, but it is important when it's needed.
Screen Shot 2017-05-30 at 3.09.34 PM.png
Screen Shot 2017-05-30 at 3.09.34 PM.png (73.27 KiB) Viewed 1701 times
I need to exclude the users AppData directory, unless they currently or at one time had Outlook 2007 and has a PST file hidden deep in there. The exception is textbook and mirrors the "Exclude a sub folder except for certain files" option given on the help page quite well. I've included a screen-shot here. Long story short, I came up missing PST files.
User avatar
Site Admin
Posts: 7212
Joined: 9 Dec 2007

Zenju

See the second example for an "exclude with exceptions": https://freefilesync.org/manual.php?topic=exclude-items
Posts: 4
Joined: 30 May 2017

pecosdave

Maybe I'm missing it? I decided to temporarily remove the /AppData/ entry then recompare the two sides, I right-clicked the PST file and chose to include, then I added /AppData/ back to the exclusion filter and it still isn't showing the .pst file as something that needs to be synced:
Screen Shot 2017-05-30 at 4.19.45 PM.png
Screen Shot 2017-05-30 at 4.19.45 PM.png (151.29 KiB) Viewed 1696 times
Even with the file name in there exactly from a right-click it's being filtered out. I also only see one example of filtering with exceptions on that page, not two.

The one I see says:

Example: Exclude a sub folder except for certain files

Set up two folder pairs with the same source and target paths but with distinct local filters:
Folder pair 1; local exclude filter: \SubFolder\
Folder pair 2; local include filter: \SubFolder\*.txt

in my case :

Example: Exclude a sub folder except for certain files

Set up two folder pairs with the same source and target paths but with distinct local filters:
Folder pair 1; local exclude filter: /AppData/
Folder pair 2; local include filter: /AppData/Local/Microsoft/Outlook/*.pst
User avatar
Posts: 2451
Joined: 22 Aug 2012

Plerry

The most important part you need to understand about include/exclude filters is:
They (=files and directories) have to match at least one entry in the include list and none of the entries in the exclude list
1) If your include filter has a first line of "*", having any more lines is useless: everything is already included.
2) By adding "\Appdata" to your exclude filter, everything inside \Appdata is excluded.
3) And be aware: all filter definitions are relative to the root of respective left- and right-locations in the folder pair.

Apparently you also do not grasp the 2nd example in the User Manual on include/exclude filtering.
It is about using two (here: identical) left-right location pairs, equal to your present location pair.
For the first pair, you use a local include filter of simply "*" and exclude filter of "\Appdata". Now all of Appdata will be excluded from that first pair.
For the second pair, you use a local include filter of (just) "\Appdata\Local\Microsoft\Outlook\*.pst" and exclude filter that is empty. Now all *.pst-files in \Appdata\Local\Microsoft\Outlook\ (or deeper) will be included in said second pair and not excluded via the (local) exclude filter.
Your global include filter should be "*" and your global exclude filter be anything you need, but does not exclude \Appdata\Local\Microsoft\Outlook\*.pst in whole or in part.

Note that the global filters are defined via Synchronization Settings (F7) or the funnel-icon mid above the left- and right location columns in the GUI, and the local filters via the funnel-icons in between each of the folder pairs.
Posts: 4
Joined: 30 May 2017

pecosdave

Thank you Plerry, you put it in a way that I understand. I must apologize, I'm a little slow on the uptake when I'm dealing with something new to me, not syncing in general, but this particular program which I really like. I have a bit of a handicap when it comes to processing new information, especially verbally but sometimes written when I'm not in the "right frame". Once I grasp it I tend to pass up my peers, I'm a conceptual / visual guy. I didn't grasp what was meant by folder pair in this instance, but it makes perfect sense now and I'm ashamed for not getting it the first time around, that should have been obvious to me.

I use this to migrate people from one machine to another at work, and to migrate users who've left the company to archives, this particular issue is the only sticking point I've had using this program and it rarely matters since Microsoft quite a while back realized it was stupid to put such important files in a hidden path. I have a Mac version of the filter also that is setup accordingly. Fortunately Macs need the inverse of what I have setup to exclude specifically the Microsoft directory in their data folder and it works beautifully. I think I'm going to do what I did yesterday from now on and manually check for PSTs, the dynamic nature of the AppData folder makes individual path exclusions impractical. I'm not really a programmer, but thinking in terms of scripts I would simply add a line "now that all that is done go and get just these if they happen to be there".
User avatar
Posts: 2451
Joined: 22 Aug 2012

Plerry

...I'm ashamed for not getting it the first time around, that should have been obvious to me. ...pecosdave, 31 May 2017, 14:44
Don't be ashamed! I am glad you get the point now.
Sometimes what has been staring you in the face and seems obvious in hindsight, might be the hardest to comprehend.
But, providing help where necessary is what this forum is for ...