Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 240 Posts 115 Joined 2008-03-10 19:31 18-year member UID 112561 Gender Male
Status Offline
set /f "delims==" %a in ('set') do echo %a will display the content before the = sign.
But if I want to get the characters after the = sign, then what? Experts, please teach me.
Credits 240 Posts 115 Joined 2008-03-10 19:31 18-year member UID 112561 Gender Male
Status Offline
Originally posted by HAT at 2008-7-30 13:34:
for /f "tokens=1,2 delims==" %a in ('set') do echo %b
It works now, thanks HAT.
Can you help explain it to me? Why does adding tokens=1,2 make it take the right side instead? But adding tokens=1 doesn't work.
Thanks.