标题:
怎样读取变量的指定字符
[打印本页]
作者:
024024
时间:
2006-3-23 17:01
标题:
怎样读取变量的指定字符
怎样读取变量的指点定字符
例:
set /p filename=请键入文件名,例如:431,732 :
::用户输入431后,我要读取第二个字符2
我用:
set filehead=%filename%:~1,1
可是结果:
D:\old\tool>set filehead
filehead=532:~1,1
请问错在哪??
作者:
Climbing
时间:
2006-3-23 18:47
应该是set filehead=%filename:~1,1%
作者:
024024
时间:
2006-3-24 09:15
Quote:
Originally posted by
Climbing
at 2006-3-23 18:47:
应该是set filehead=%filename:~1,1%
think very much
作者:
Climbing
时间:
2006-3-24 09:29
同学,英语不是这样说滴。
欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/)
Powered by Discuz! 2.5