Batch file help - copying all xml files from folder and subfolders

  • Thread starter Thread starter lca1630
  • Start date Start date
L

lca1630

Guest
I need help putting together a batch file that copies all xml files from a
folder and its subfolders to another folder on a different partition.

copy /y .....................?

Thanks for your input.
 
Re: Batch file help - copying all xml files from folder and subfolders


"lca1630" <lca1630@discussions.microsoft.com> wrote in message
news:8BF378FF-E511-47A9-963A-5606AA6E89C3@microsoft.com...
>I need help putting together a batch file that copies all xml files from a
> folder and its subfolders to another folder on a different partition.
>
> copy /y .....................?
>
> Thanks for your input.


Try this:
@echo off
set Source=c:\Folder 1
set Target=d:\Folder 2
robocopy /s "%Source%" "%Target%" *.xml
alternatively:
xcopy /s /y /d "%Source%\*.xml" "%Target%\
 
Back
Top