Forum Discussion

AlexanderLindberg's avatar
AlexanderLindberg
Copper Contributor
Oct 28, 2025

Robocopy wildcard ignores leading period

Hello,

I came across this as I was making a custom procedure to sync our roaming folders (yes we still need them!), as this feature has been a bit shaky in W11.

 

In the root of a user home, there's a few NTUSER-related files,

NTUSER.DAT

ntuser.dat.LOG1

ntuser.dat.LOG2

NTUSER.DAT{...

and so on. 

 

Even though I think that it's best to leave all these files alone, while playing around with wildcards I noticed that it was impossible(?) to get

/XF "ntuser.dat.*" 

to match only ntuser.dat.LOG1 and ntuser.dat.LOG2, it swallowed NTUSER.DAT as well. Only if I matched on 

/XF "ntuser.dat.L*

did it leave NTUSER.DAT alone. 

 

Surely this is not intended behavior? Or does the dot have an undocumented function in relation to wildcards?

 

Best regards

Alexander

No RepliesBe the first to reply

Resources