Batch to move without structure

March 11, 2009 at 04:56:34
Specs: Windows XP
I am looking for the batch command to move files of type .xml, from folder 1 (and subdirectories) to folder 2 (minus the folder structure). So only the xmls are moved from folder 1.

Thanks in advance.


See More: Batch to move without structure

Report •


#1
March 11, 2009 at 07:53:52
Alter this to your exact drive\folder for the source and destination.

===========================
@echo off & setLocal EnableDelayedExpansion

pushd "folder 1"

for /f "tokens=* delims= " %%a in ('dir/s/b/a-d *.xml') do (
move "%%a" "d:\folder 2"
)


=====================================
If at first you don't succeed, you're about average.

M2


Report •
Related Solutions


Ask Question