本帖最后由 yhcbird 于 2012-1-4 11:07 编辑
以下代码第27行“start "%%p"”这句,为什么打开的时候会切到另外一个cmd窗口。而不是打开路径呢?- @echo off
- @del /f /q temp>nul 2>nul
- @del /f /q temp1>nul 2>nul
- setlocal enabledelayedexpansion
- for /f %%I in ('"dir /ad /b"') do (
- set /a a+=1
- echo 编号!a!、%%~fI>>temp)
- :a
- echo _______________________________________________________________________
- more temp
- echo _______________________________________________________________________
- set /p aa=请输入要查询的编号:
- cls
- for /f "delims=编号%aa%、" %%j IN ('"findstr /r /c:"编号%aa%、" temp"') do (
- echo %%j
- for /f %%I in ('"dir /ad /b "%%j""') do (
- set /a b+=1
- echo 编号!b!、%%~fI>>temp1))
- :b
- echo _______________________________________________________________________
- more temp1
- echo _______________________________________________________________________
- set /p ab=请输入要打开的编号:
- cls
- for /f "delims=编号%ab%、" %%p IN ('"findstr /r /c:"编号%ab%、" temp1"') do (
- echo "%%p"
- start "%%p"
- )
- goto :b
- pause>nul
复制代码
|