Exclude "Temporary Internet Files" on Windows

I’m trying to run Restic on multiple PCs at once, using paexec.

Long story short, I’m trying to pass:

–exclude “\Temporary Internet Files”

in some fashion to get it to exclude ANY folder (not file, just folders) with that name. I’m trying to get ALL user profiles, and so I don’t want to be specific on the path.

I’ve tried:

–exclude “Temporary Internet Files”
–exclude “\Temporary Internet Files”
–exclude “.\Temporary Internet Files”
–exclude “/Temporary Internet Files”
–exclude “./Temporary Internet Files”

EDIT: Also tried --exclude “Temporary\ Internet\ Files”

all to no avail. It responds with:

Internet does not exist, skipping
Files does not exist, skipping

Then a fatal error and quits.

I’m guessing it doesn’t see “Temporary Internet Files” as a single string. Is there something I should be using instead of quotes?

EDIT: Okay, apparently even --exclude “Temp” doesn’t work. Says it doesn’t exist, and skips…

Nevermind. Figured it out. Before all the excludes, I had “C:\Users\” - and it needed to be “C:\Users” without the trailing “\”.

So, it was treating all the excludes as paths to include, or something to that effect. It’s working now. Leaving my headache here for others to learn from my many mistakes lol.

Also I think the correct exclude nomenclature is:

–exclude=“Temporary Internet Files/**”

For anyone who’s interested.

I take it back…

–exclude=“Temporary Internet Files/**” is NOT working. Even with the trailing “\” left off of the user profile path.

I get “Internet does not exist, skipping” back.

Has anyone successfully excluded directory paths with spaces in them on Windows??

The full command I’m trying to run is:

restic.exe backup --cleanup-cache C:\Users --tag USER_PROFILE --iexclude="C:\Users\admin" --iexclude="C:\Users\administrator --iexclude="C:\Users\mss*" --iexclude="*.ost" --iexclude="*.tmp" --iexclude="Cache\**" --iexclude="Copitrak\LOGGING\**" --exclude="Code Cache\**" --iexclude="GPUCache\**" --exclude="Media Cache\**" --iexclude="Temp\**" --exclude="Temporary Internet Files\**" >>\\san\data\.restic\logs\%USERNAME%-%COMPUTERNAME%.LOG

OR

restic.exe backup --cleanup-cache C:/Users --tag USER_PROFILE --iexclude="C:/Users/admin" --iexclude="C:/Users/administrator --iexclude="C:/Users/mss*" --iexclude="*.ost" --iexclude="*.tmp" --iexclude="Cache/**" --iexclude="Copitrak/LOGGING/**" --exclude="Code Cache/**" --iexclude="GPUCache/**" --exclude="Media Cache/**" --iexclude="Temp/**" --exclude="Temporary Internet Files/**" >>\\san\data\.restic\logs\%USERNAME%-%COMPUTERNAME%.LOG

Which comes back with:

Cache/** --iexclude=GPUCache\** --exclude=Media does not exist, skipping
Cache/** --iexclude=Temp\** --exclude=Temporary does not exist, skipping
Internet does not exist, skipping
Files/** >>\\san\data\.restic\logs\mss-MSS.LOG does not exist, skipping

I’ve tried making them all forward-slashes, or all backslashes. Doesn’t matter, same errors. If I take the excludes out that have spaces, the command passes successfully with either forward or back slashes.

Okay…

I downloaded the very latest beta (v0.9.5-31-g3ca42405) and now --exclude-file works with the following:

*.ost
*.tmp
AppData\Local\Microsoft\Windows\INetCookies\**
AppData\Local\Microsoft\Windows\INetCache\**
AppData\Local\Microsoft\Internet Explorer\DOMStore\**
AppData\Local\Microsoft\Internet Explorer\imagestore\**
AppData\Local\Microsoft\Internet Explorer\imagestore\**
C:\Users\admin
C:\Users\administrator
C:\Users\mss
Cache\**
Code Cache\**
Copitrak\LOGGING\**
CryptnetUrlCache\**
GPUCache\**
IconCache*.db
Media Cache\**
Temp\**
Temporary Internet Files\**
WER\ReportQueue\**
WebCache\**
cache\**
iconcache*.db
temp\**

Now if only there was an --iexcludes-file to ignore case… but this will do for now! :smiley: