这样试试- @echo off&setlocal enabledelayedexpansion
- set temp_=ABCDEFGHIJKLMNOPQRSTUVWXYZ
- for /l %%a in (0,1,26) do if "!temp_:~%%a,1!" == "%cd:~0,1%" (set /a temp__=%%a+1)
- if /i "%cd:~0,1%" == "C" (
- for /f "tokens=1,2 delims=," %%a in (temp) do (
- for /f "delims=" %%i in ('mountvol %%a /l') do mountvol %%a /d&mountvol X: %%i
- for /f "delims=" %%j in ('mountvol %%b /l') do mountvol %%b /d&mountvol Y: %%j
- )
- erase temp,%~nx0&(echo.Done.&pause>nul)&goto :loop
- ) else (
- echo.当前:%cd:~0,1%:→X:,下一个:!temp_:~%temp__%,1!:→Y:
- echo.%cd:~0,1%:,!temp_:~%temp__%,1!:>c:\temp
- copy %0 c:\>nul&pushd c:&%~nx0
- )
- :loop
- pushd X:
- x:\*.exe
复制代码
|