Trouble with exclusions

I am trying to exclude the directory “LocalCache” (as seen in the first screenshot) from backups. In the file exclusions section, I’ve typed out “*\LocalCache*” (as seen in the second screenshot).


However, it still seems to be trying to back those files up and giving me the same “Can’t open file” error. Have I misunderstood the syntax with exclusions? I appreciate any help.

Hi, and welcome…

My initial thought was that you should be including the trailing/closing slash (“\LocalCache*") but then the second screenshot suggests that you’re backing up a Windows computer, which has backslashes instead of forward ones,so perhaps try:
"
/LocalCache/*”

Let us know how it goes…know that it is working fine for me, but I was tired and lazy when setting up the exclusions - so just put both slash variants in…

1 Like

Thanks for the advice. I’ve changed the exclusions to be as follows:
C:\Users\*\AppData\Local\Packages\*;/LocalCache/*;\LocalCache\*;*\LocalCache\*;*/LocalCache/*
I’ll cross my fingers and hope that this works.

If you’ve done a copy-paste of it, you missed the backslash after Users there…before the wildcard - but you can just use *\AppData\* to catch that foldername from anywhere in the path, so it’ll catch for all user folders anyway…

Sorry, a few things got messed up by markdown. I don’t want to exclude the entire AppData folder as it isn’t causing any problems and there could be important files in it. I will try that next though if this current set of rules doesn’t work.

Just thought that I’d add my exclusions - but bear in mind that I was tired when setting this up, and it is only for my personal Windows workstations…and therefore, I was just replicating forward with backslashes, and never bothered going back to it…
*\$Recycle.Bin\*;*/$Recycle.Bin/*;*\AppData\*;*/AppData/*;*\WinSxS\*;*/WinSxS/*;*.ost;*\System Volume Information\*;*/System Volume Information/*;C:\_Movies\*;C:/_Movies/*;C:\Windows\CSC\*;C:/Windows/CSC/*;C:\_Lock\*;C:/_Lock/*;C:\Users\Me\Downloads\*;C:/Users/Me/Downloads/*;*\OneDrive - Company\*;*/OneDrive - Company/*;C:/Windows/Installer/*;C:\Windows\Installer\*;