0

For example: robocopy c:\folder d:\folder /MIR /ZB /FFT /MT:32 /R:10 /W:5 /NP /XD cache temp /sl /xj

I can clearly see it copying folders with "cache" and "temp" in it. (ie. c:\folder\chrome\default\code cache\js\blah)

I've tried different things:

/xd cache /xd temp

/xd cache /xd temp

/xd "cache" /xd "temp"

/xd "cache" "temp"

But /xd cache temp chrome seemed to work to exclude the whole chrome folder

5
  • Not a direct answer, but I've personally had more success selecting files using some other tool, and then passing along to RoboCopy to move the file(s). Commented Apr 11 at 22:36
  • that is certainly a solution but it would be ideal if I could do everything with just robocopy. And it would be nice to better understand why it seems that some filter criteria work and some dont.
    – eng3
    Commented Apr 11 at 22:42
  • are cache, temp, and chrome in the root of c:\folder ? have you tried CDing into c:\folder? Commented Apr 11 at 23:09
  • no they are scattered, like in the example I gave
    – eng3
    Commented Apr 11 at 23:59
  • I don't think this is correct. in my example, when I add "/XD chrome" it includes the folders containing "chrome". It just seems to be somehow selective. If I exclude "cache", it seems to be ignored
    – eng3
    Commented Apr 12 at 17:10

1 Answer 1

0

Through trial and error it seems I need to use a wild card and quote it.

/xd "cache" "temp"

seems to work

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .