
CODE: [Copy to clipboard]@echo off&setlocal
for %%a in (*.txt) do call :pp "%%a"
dir /b *.txt
:loop
set/p a=Enter Number(E=exit):
if /i %a% equ e goto :eof
call %%[%a%]%%
goto loop
:pp
for /f "delims=()" %%x in (%1) do set [%%x]=%1
goto :eof
CODE: [Copy to clipboard][ Last edited by tghksj on 2007-1-9 at 03:17 PM ]@ECHO %dbg% OFF
setlocal ENABLEDELAYEDEXPANSION
:OPEN
SET /P NO=输入要打开的文档序号:(输入E退出程序)
IF /I %NO%==E EXIT
FOR /F "tokens=*" %%I IN ('dir /b ^(!NO!^)*.txt') DO "%%I"
GOTO :OPEN
CODE: [Copy to clipboard]@echo off&setlocal
:OPEN
cls
dir/b *.txt
SET /P NO=输入要打开的文档序号:(输入E退出程序)
IF /I %NO%==E (goto :eof)
FOR /F "tokens=*" %%I IN ('dir /b ^(%NO%^)*.txt') DO notepad "%%I"
GOTO :OPEN
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |