不好意思,刚才看了这篇本站帖子
http://dos.e-stone.cn/dosbbs/dispbbs.asp?boardID=12&ID=8905
真的觉得自己太菜了,简直象个白痴一样,收回上面所有发言
附上修改以后的代码,望请指点
@echo off
if not == goto step2
echo e102''''''''set %%1=''''''''>cmd.dat
echo w>>cmd.dat
echo q>>cmd.dat
echo Welcome to my test
echo if you want to terminate input string,write ^Z
for %%x in (var1 var2 var3 var4 var5) do call %0 %%x
goto output
:step2
echo please test your string:
fc con nul /lb1 /n|FIND "1:" >%1.bat
debug %1.bat nul
call %1.bat %1
goto end
:output
echo yes,you''''''''ve write five string now ,they are:
echo the firstis: %var1%
echo the second: %var2%
echo the third: %var3%
echo the forth: %var4%
echo the fifth: %var5%
for %%x in (var1 var2 var3 var4 var5) do del %%x.bat
:end