|
Answer» Dear All,
I ve RED the regedit by using following script line REG QUERY "HKLM\Software\Oracle" /v FORMS60.it returns the value like FORMS60 REG_EXPAND_XZ d:\forms6i\FORMS60.but i need to show d:\forms6i\FORMS60 these part of the string only
please help me to trim this and also help me to show the trimmed value
Thanks JebeshQuote @echo off
SET string=FORMS60 REG_EXPAND_XZ d:\forms6i\FORMS60
REM 1: trim the string into its 3 tokens
for /f "tokens=1,2,3 delims= " %%a in ("%string%") do ( set token1=%%a set token2=%%b set token3=%%c )
REM show the 3 SUB strings echo token number 1 is %token1% echo token number 2 is %token2% echo token number 3 is %token3%
|