Trying to exclude OneDrive, Temp and Downloads from backup

I am getting the Error:

Error getting complete file “oLqkEZbDhQS3JGx3s0tZ|C/Users/./OneDrive - /XXXX.xlsx” from DEV-2001. Errorcode: CANNOT_OPEN_FILE (3)

I am trying to exclude OneDrive, Temp, Downloads.

On the Windows server I have: *\Temp*;\Downloads*;*\OneDrive\*

It does not seem to be working what am I missing?

I did discover that the files that are giving the error seem to be files that are deleted on the local machine, but are still on the OnDrive.

This seems to have a slash? Maybe the pattern is wrong?

I’d add it has full path. E.g. C:\Users\:\OneDrive;C:\Users\:\OneDrive - *

so then would it look like this ?

C:\Users\:\OneDrive;C:\Temp;C:\Users\:\downloads

Yeah if you don’t have OneDrive folders with slash in it

It did not work so I’m going to try tonight :

C:\Users:\OneDrive;C:\Users:\OneDrive - *;C:\Temp;C:\Users:\downloads

I would suggest C:\Users\Onedrive\*

I believe one should append an asterisk after the folder delineation.

So it would look like:
C:\Temp;C:\Users:\downloads;C:\Users\OneDrive\*

So the actual path is C:\Users\usersname\OneDrive\* Should I put something in to represent the changing user name?

I haven’t tried this myself, but I would try this:

C:\Users\*\OneDrive;C:\Users\*\OneDrive*

The “*” is a wild card, so is “:” - see more details here. So below I am demonstrating with capital letters = USERNAME.

Your path will never find the OneDrive folder because it doesn’t exist at: C:\Users\OneDrive\*

The personal OneDrive location is = C:\Users\USERNAME\OneDrive
The business OneDrive location is = C:\Users\USERNAME\OneDrive - BUSINESS

FYI - I don’t have any C:\Temp location on my Windows 11 25H2 system. If you google some locations for Windows 11 temp folders you will find them here:

C:\Windows\Temp
C:\Users\USERNAME\AppData\Local\Temp

I asked Grok and it came back with it’s suggestion:

*.tmp;Users:AppData*;Users:(OneDrive|OneDrive - *)*

Steve

Thank you for the information Steve.

I’ll try C:\Users\*\OneDrive;C:\Users\*\OneDrive* tonight and let you know the results.

I almost agree with Steve.

If you wished to exclude specific users and not just all…then you can specify multiple exclusions each separated by semicolons.

Also recall that (according to doc) you can’t have exclusions and inclusions within the same client rules. You CAN achieve this via other methods:- for example - a virtual sub client.

Example excluding user1 and useruser2.

C:\Users\user1\OneDrive\*;C:\Users\useruser2\OneDrive\*

Note. I don’t says OneDrive*. I say OneDrive/*.

The reason I include OneDrive and not it’s contents is because I **MAY** not wish to exclude the folder from backups. Thus making the restore process “cleaner” should it need to occur .

I am unsure as to how flexible the regex processor (wildcard interpreter) is. Hence, I don’t show how to use wildcards in the username field.

Interesting, so how would you phrase it to exclude the temp folder, download folder and onedrive for all users?

Going to try this tonight,

C:\Users*\AppData\Local\Temp*;C:\Users*\Downloads*;C:\Users*\OneDrive*

Did it work for you?
I’ve tried this:
/onedrive/;/iCloud Photos/;Users:\OneDrive;Users:\Pictures\iCloud Photos;Users:\AppData
and this:
\onedrive*;\iCloud Photos*;Users:\OneDrive;Users:\Pictures\iCloud Photos;Users:\AppData;\OneDrive*;\windowsapps*
Still see these:
Error getting complete file “GGUYmmvb2lKCyDvAmkY6|OneDrive/AmvacInv9122.xlsx”

Sorry, No the below did not work for me (C:\Users*\AppData\Local\Temp*;C:\Users*\Downloads*;C:\Users*\OneDrive*)

I’m still getting a tone of the same errors.

I’m not a Windows man but according to me if you say “\Users*\blahblah” as opposed to “\Users\*\blah blah” then you’re saying any folder which is

named “USERS SOMETHING"

Not

“ all users who’s names are subfolders contained in the folder named Users”.

I thought that was the way windows did it.

Certainly that’s the way I’ve known wildcards to work since 1977.