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.