recursion - Recursively search for a file name and copy in MS DOS -
i have text file containing names of files separated newline , folder many sub folders contain files matching names in text file.
i want pick file names text file can done using for
loop; , recursively search file name in folder , if file found copy different location.
can please shed light on it?
thanks,
@echo off /f "usebackq delims=" %%a in ("file names.txt") ( /f "delims=" %%b in (' dir "c:\folder\%%a" /b /s /a-d ') ( copy "%%b" "c:\new folder" ) )
Comments
Post a Comment