1.

Solve : How to read text file and value into batch file variable??

Answer»

Hi all
I have a file CALLED a.txt and it has some values. Now I want to read this file in a.bat file and get EVERY value into some VARIABLES. Can any one help me how to do this.

Best Regards@echo off
set idx=0
for /f "tokens=1*" %%a in (a.txt) do (
call set /a idx=%%idx%%+1
call set E.%%idx%%=%%a
)


variables WOULD be, e.1, e.2 ,e.3 ect.Awesome . I really apreciate it. Thank you very much



Discussion

No Comment Found