How can I have robocopy exclude any file with a
in the filename, unless it also has b
?
EG Exclude
foo-a.txt
foo-a-c.txt
Include
foo-a-b.txt
foo-a-b-c.txt
The /XF
switch looks like it's the most promising, but I don't know how to construct the wildcard for anything more than basic *
style globs.
/XF file [file]... :: eXclude Files matching given names/paths/wildcards.
Doing something like robocopy /mir c:\test\source\ c:\test\dest\ /XF "*a*"
results in no files being copied