Re: [BATCH WORLD] XCOPY exclude problem
On Fri, 28 Mar 2008 10:04:05 -0000, "Byrne, Derek" <Derek.Byrne@...> wrote:
> Aye, I tried that too, but it ended up skipping the /EXCLUDE switch entirely and copied the whole subdirectory:
Remove the double quotes from within the exclude file itself - it would appear a different programmer wrote that bit, breaking the past methods.
c:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>type backup.cmd
echo C:\Documents and Settings\dbyrne\Desktop\copy1\excludedfolder>MyExcludes.txt
SET COMMAND=XCOPY /D /E /C /I /H /R /Y /EXCLUDE:MyExcludes.txt
set RPATH="C:\Documents and Settings\dbyrne\Desktop\copy1"
set LPATH="C:\Documents and Settings\dbyrne\Desktop\copy2"
%COMMAND% %RPATH% %LPATH%
c:\Documents and Settings\dbyrne\Desktop\_Excludes_Batch>backup
C:\Documents and Settings\dbyrne\Desktop\copy1\d2.txt
C:\Documents and Settings\dbyrne\Desktop\copy1\d3.txt
2 File(s) copied
Press any key to continue . . .