随便写了一个,知道你要的是不是这个效果.
- @echo off
- :in
- echo.
- set /p in="Input a or b ... (X=exit) > "
- if "%in%"=="" goto in
- if "%in%"=="x" goto end
- if "%in%"=="X" goto end
- if "%in%"=="a" goto a
- if "%in%"=="A" goto a
- if "%in%"=="b" goto b
- if "%in%"=="B" goto b
- goto in
- :a
- set /p infile="Input a file, path and name ... "
- if "%infile%"=="" goto a
- if exist "%infile%" (
- copy /y "%infile%" c:\
- ) else (
- echo "%infile%" is not exist!
- )
- goto in
- :b
- for /f "usebackq" %%f in (`"dir /b c:\*.txt"`) do (
- echo ----%%f]----
- type "c:\%%f"
- )
- goto in
- :end
- exit 0
hxuan?表ー: 2006-11-22 11:35
Last edited by hxuan999 on 2006-11-22 at 12:40 PM ]