add in text string in a text string from a ref.txt

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
jamesfui
Posts: 50
Joined: 27 Mar 2010 23:00

add in text string in a text string from a ref.txt

#1 Post by jamesfui » 02 Apr 2010 07:10

hi everyone,
i like to add in text string in another text string from a ref.txt!!
for example,

ref.txt
-----------content--------------
efgh.bmp
ijkl.pdf
...etc

-----------end content----------



copy.bat
---------------code start----------------
@echo off
for /f %%a in (abcd.jpg efgh.bmp ijkl.pdf[/b]) <- insert it here!!!

---------------code end-----------------

is it possible to do that??
or either way, read all the contents from ref.txt & insert it as above!!

thanks :D

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

Re: add in text string in a text string from a ref.txt

#2 Post by avery_larry » 05 Apr 2010 09:44

Code: Select all

for /f "usebackq delims=" %%a in ("c:\path to file\ref.txt") do echo %%a

Post Reply