Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Does anyone know of a method to copy files from a list stored in a text file? It could be a Command Prompt like:
c:\ copy < source_files.txt c:\destination
I suspect their is some type of 'redirect' option to force the reading of a text file for input to the 'source' side of the copy operation, but I haven't found anything.
Thanks in advance.
Kevin
System Consultant

using a command such as your example,
you'll make a copy of the actual text file, and put it in the destination directory.thats a great question. It would be made into a batch file, perhaps that would work.
with some stuff like@echo off
copy *.* c:\destination
:endmake a batch file.
name it what ever you want.bat
have your target files somewhere (a:drive?)
tell the batch file
copy a:\*.* c:\destination
inside the batch file.sounds close to me.
good luck.

Perhaps a variant of 'For.. In.. Do'
for %%x (file1,file2,file3) do copy c:\target %%x
but to get the list of files into the brackets with commas ....
not so sure, but might be worth exploring

What you need is a file text replace tool. I use one called FR which you can find on
http://www.openinformationsystems.com/provalov/tony/
So you can could enter the following commands (or create a batch file):
--
c:
dir /s/b > copyme.dat
fr copyme.dat c: "copy c:" copyme.bat
d:
c:copyme.bat
--So this would replace all the 'c:' text with 'copy c:' into a another batch file called copyme.bat, which you could then run from a directory, which would then copy all the files in the copyme.dat text file over!
The copyme.dat file would look like:
c:\winnt\system32\ansi.sysAnd after it's been FR'd it'd look like:
copy c:\winnt\system32\ansy.sys
You can't add a drive letter to the end of the line though, which is why you need to run it from another drive or directory.
Hope this makes some sense..
PorkChops aplenty

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |