- @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
复制代码
在执行完上述代码后
如何跳出循环 进入修改后的X盘 执行其他操作
如运行某EXE程序
不好意思 我搜索了论坛里的帖子,实在看不懂 |