- @echo off&setlocal enabledelayedexpansion&title test
- del %temp%\tmp.x;%temp%\false>nul 2>nul
- if "%~1" neq "" goto loop
- start /b %~fs0 test
- for /f "delims=" %%a in (a.txt) do (
- set "str=%%a"
- for %%a in (, : 。 .) do set "str=!str:%%a= !"
- call :lp
- )
- cd.>%temp%\false&exit
- :lp
- if not exist %temp%\tmp.x (
- <nul set /p=%str:~,1%
- set "str=%str:~1%"
- if defined str ping -n>nul&goto lp
- ) else (
- goto lp
- )
- set/p= <nul&goto :eof
- :loop
- pause>nul
- cd.>%temp%\tmp.x
- pause>nul
- del %temp%\tmp.x
- if not exist %temp%\false (goto loop)
- del %temp%\false,tmp.x>nul 2>nul
- exit
复制代码
[ 本帖最后由 pusofalse 于 2008-10-15 17:16 编辑 ] |