views:

183

answers:

1

Here is what i have for now:

xcopy "c:\projects\SampleProject" "c:\temp\copytest" /E /H /EXCLUDE:elist.txt

It does all the job i need except filtering filenames by extensions.

For example: copy all *.exe files from c:\temp\copytest and subdirectories.

How to do that?

A: 

Something like:

@echo off
setlocal
set DIR=
set OUTPUTDIR=C:\Documents and Settings\<username>\Desktop\sandbox1\output
for /R %%a %DIR% in (*.mp3) do xcopy "%%a" "%OUTPUTDIR%"
trismarck