I need extension to this question: search given set of files and copy to another directory
There is a given set of file names in a needToFind.txt file such as:
m
@echo off cd "\MyImageFolder" for /F "usebackq delims=" %%a in ("needToFind.txt") do ( for /R %%b in ("%%~Na.*") do copy "%%b" "\anotherFolder" )