Solved Reading text file value into batch file

July 4, 2012 at 23:19:17
Specs: Windows XP
how to read single value of text file into batch file variable

ex:in text file
how to read the value or character 'w' into batch file ..

in batch file,i'v written code as

@echo off

for /F "tokens=*" %%I in (keyvalue.txt) do @echo %%I >> keyvalue.bat
from dis above code,entire text line is getting into batch file..i need oly single character..please help me in solving out dis issue

See More: Reading text file value into batch file

Report •

July 5, 2012 at 10:44:26
✔ Best Answer
@echo off & setlocal enabledelayedexpansion
for /F "tokens=*" %%I in (keyvalue.txt) do (
set key=%%I
set key=!key:~0,1!
!key! >> keyvalue.bat

Report •
Related Solutions

Ask Question