Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

Not very clear, but if you want to set a var try this:
===========================
@echo off & setLocal EnableDELAYedExpansionfor /f "tokens=1-2* delims= " %%a in (abc.txt) do (
set var=%%c
)
echo !var!
=====================================
Helping others achieve escape felicityM2

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |