1. 程式人生 > >接收鍵盤輸入字串的程式(轉)

接收鍵盤輸入字串的程式(轉)

:: Get user input - includes error check
@echo off
echo e102'set %%1='> %temp%.\t1.dat
for %%? in (w q) do echo %%?>> %temp%.\t1.dat
:input
echo.
echo Type input:
FC con nul /lb1 /n |FIND "1:" > %temp%.\t2.bat
:: Error checking begins here
FIND "|" %temp%.\t2.bat > nul
if not errorlevel=1 goto error
FIND "=" %temp%.\t2.bat > nul
if not errorlevel=1 goto error