read till end of file

February 25, 2009 at 22:36:57
Specs: Windows XP
hi,
could you pls help me wrting a script to read from 1st to last line of the file and generate the command like below?
lets say, abc.out has entries like
2222
3333
4444
and it should generate me a command like,
force application('2222','3333','4444')"
abc.out may have 4 entries or 5 or any number and it should generate the command accordingly.
pls help
thanks in advance.

See More: read till end of file

Report •


#1
February 26, 2009 at 00:07:21
@echo off
setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in (abc.out) do (
set str=!str!'%%a',
)
set str=(!str!)
echo !str!
echo force application!str!


=====================================
If at first you don't succeed, you're about average.

M2


Report •
Related Solutions


Ask Question