Copy server files listed in txt file to local

January 6, 2011 at 14:58:47
Specs: Windows XP
I am running the findstr application to search a server share for certain documents. It returns its results in the form of a text file that lists all the files along with their location. My question is, is there a command out there that will read the text file and copy the files to a local directory on my hard drive? I've tried the following command and received the error "system cannot find the file specified".

for /f %a in ('type c:\tools\copylist\list.txt') do copy %a c:\data\ediscovery

One other note, the location of the files in the list are on a server so it looks like "S:\Folder\File.doc". I'm wondering if the problem is happening because the files are on the "S" drive??


See More: Copy server files listed in txt file to local

Report •

#1
January 7, 2011 at 00:50:35
Did you try this with the Command Prompt or a batchfile?

The command you tried is ok I think, but if you do this within a batchfile,

You should use double %% instead of one.

Try;

for /f %%a in ('type c:\tools\copylist\list.txt') do copy %%a c:\data\ediscovery

Happy is ONE who says I am an OttoMAN.


Report •
Related Solutions


Ask Question