my exclude.tmp is as follows:
C:\WINDOWS;c:\Program files
but when i try batch:
echo %windir%;c:\Program files>exclude.tmp
for %%a in (xls ppt ) do (
xcopy "*.%%a" "%destination%" /c /s /exclude:exclude.tmp
)
system still copy files from "program files" directory to destination, what should i do?
batches excluding multiple directory in xcopy
Moderator: DosItHelp
Re: batches excluding multiple directory in xcopy
xcopy /?
The 2nd sentence tells you why.
Regards
aGerman
Code: Select all
/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.
The 2nd sentence tells you why.
Regards
aGerman