Jump to content

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


Recommended Posts

Guest lca1630
Posted

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.

  • Replies 1
  • Created
  • Last Reply

Popular Days

Guest Pegasus \(MVP\)
Posted

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%\


×
×
  • Create New...