Need to read a text file from a batch file

Microsoft Windows xp professional editio...
September 15, 2009 at 02:05:47
Specs: Windows XP
Hi,
I would like to read text file e.g. abc.txt from batch file. There will be only one line in abc.txt file as given below...

InstallationPath REG_SZ C:\Program Files\XYZ\My SoftwarePath\

I would like to read the path i.e. "C:\Program Files\XYZ\My SoftwarePath\"

with blanks in it.

Please guide me to solve this problem.

Thanks.
Regards,
Mukund


See More: Need to read a text file from a batch file

Report •


#1
September 16, 2009 at 09:13:44
Not very clear, but if you want to set a var try this:

===========================
@echo off & setLocal EnableDELAYedExpansion

for /f "tokens=1-2* delims= " %%a in (abc.txt) do (
set var=%%c
)
echo !var!


=====================================
Helping others achieve escape felicity

M2


Report •
Related Solutions


Ask Question