Find file according fileName and move

January 21, 2011 at 04:31:16
Specs: Windows XP, Core2Duo/2GB
Hello everybody,

I am dealing with an issue.
I have a list (txt) (e.g. fileNameList.txt) with fileName of some of the files in a certain directory (Dir1).

I want to copy all the files in another directory (Dir2) based on this criteria:
"Search for file in Dir1, whose name is in the fileNameList.txt list and save a copy in Dir2.

Can you please help me?

Thanks and regards,

@echo off & setLocal EnableDELAYedeXpansion

pushd Dir1

for /f %%a in (Dir1\fileNameList.txt) do (
copy %%a Dir2

Am I missing anything?
Am I correct?

Please help

See More: Find file according fileName and move

Report •

January 21, 2011 at 07:41:40
can you post what is in fileNameList.txt?

Report •
Related Solutions

Ask Question