XCOPY /Exclude Directory Syntax
        Posted  
        
            by Onion-Knight
        on Super User
        
        See other posts from Super User
        
            or by Onion-Knight
        
        
        
        Published on 2010-04-22T13:49:24Z
        Indexed on 
            2010/04/22
            13:53 UTC
        
        
        Read the original article
        Hit count: 397
        
I'm trying to use XCOPY to copy a directory that looks like this:
-MainFolder
 -ManyFoldersIWantToCopy
 -ManyFoldersIWantToCopy
 -...
 -Source Code
I want to use the /EXCLUDE option to copy every folder except Source Code.
I tried using the following, but I did not have any luck:
xcopy "Source" "Destination" /EXCLUDE:"\Source Code\" /E /C /R /I /K /Y
The error message I receive says: Can't read file: "\Source Code\".
I've tried removing the double-quotes all together, using single-quotes instead, with/without the \'s, but I get the same error message.
Any ideas?
© Super User or respective owner