I have used EXCLUDE before to avoid XCOPY'ing certain files. But am trying to figure out if there is a way to EXCLUDE folders by Folder Name or not.
OS I am working with is Windows XP Pro BTW
/EXCLUDE:file1[+file2][+file3]...
Specifies a list of files containing strings. Each string
should be in a separate line in the files. When any of the
strings match any part of the absolute path of the file to be
copied, that file will be excluded from being copied. For
example, specifying a string like \obj\ or .obj will exclude
all files underneath the directory obj or all files with the
.obj extension respectively.
Basically I want to xcopy the contents from My Documents and exclude the following folder names
DYMO LABEL
My Music
My Pictures
My Videos
I know that I can just write a batch pointing out exactly what to grab, but as folders are added this will mean that I'd have to edit my batch accordingly to grab those as well. So I figured I'd check to see if there was an Exclude Trick to target Folder Names to exclude from xcopy's scope?
I suppose I could also perform a wildcard exclusion such as *.jpg *.mp3 etc to avoid certain file types from being targeted that are in those locations. And if there is no way to exclude by folder names I might just have to create a wildcard listing of file types to exclude. Trying to remember how I did that a while back... I think it was like
xcopy *.* e:\*.* /s/d/y/exclude:<Exclusion_List.txt
to read in exclusion list text file and process, and exclusion list was like this format of 1 line per exclusion
*.jpg
*.bmp
*.MP3
*.MP4
*.wav