
| Quote: | |
|
CODE: [Copy to clipboard]其它需要的内容,往架子里添就行了~:)@ECHO OFF
vol|find "drive A" >nul
if errorlevel 1 goto :DISK-N
if errorlevel 0 goto :DISK-A
:DISK-N
:: 反正判断当前盘不是A盘,做什么都行:)
:: 在里面执行不是A盘时所要执行的代码
Goto :End
:DISK-A
:: 当前盘是A盘,写相关代码
:: 设置变量 U 为 A ,表示当前盘是A盘(这个设置盘符变量的用不着,除判断多个盘时将来可以用)
SET U=A
ECHO DISK %U%
Goto :End
:: 其它代码段 ……
:End
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |