|
Answer» Hello thr,
Can anybody plz let me know about the alternate FUNCTIONALITY for the FOR command, which is supported in 2000/NT/XP, but not in WIN 98.
This is my desire...
>>
start /w regedit /e reg1.txt "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment" type reg1.txt | find "JavaHome" > reg2.txt if errorlevel 1 goto ERROR for /f "tokens=2 delims==" %%x in (reg2.txt) do set JavaTemp=%%~x if errorlevel 1 goto ERROR del reg1.txt del reg2.txt
<<
I need to seach for some text in txt file and hav to set for a variable.... i need exact alternate for the 'FOR' stmt.. in the above code....
Plz help me ASAP...
Thanks all ....what do you mean by alternate for the for STATEMENT?
if windows 98 has findstr try this to search for text in a file and set to variable.. for /f "tokens=1*" %%a in ('findstr Javahome %temp%\reg2.txt') do set javatemp=%%a
|