Using robocopy and excluding multiple directories
Posted
by
GorrillaMcD
on Super User
See other posts from Super User
or by GorrillaMcD
Published on 2012-10-01T21:32:51Z
Indexed on
2012/10/01
21:41 UTC
Read the original article
Hit count: 210
windows-server-2008-r2
|robocopy
I'm trying to copy some directories from a server before I restore from backup (my latest backup was corrupt, so I have to use an older one :( ). I'm in the Windows Recovery Environment and have access to the server's file system G:\
and my backup media C:\
. But, since I'm more familiar with Linux, I'm having a bit of trouble with the command line in Windows, specifically robocopy
.
I want to copy multiple directories (maintaining the same directory structure) from G:\ to C:\ while excluding others (namely, the Windows and Program Files folders). I can't figure out the syntax for the /XD
option. I was hoping to do something like:
robocopy G: C:\backup /CREATE /XD "dir1","dir2", ...
© Super User or respective owner