无忧启动论坛

标题: 高手请帮忙,关于判断盘符的批处理 [打印本页]

作者: 715    时间: 2008-2-28 13:12
标题: 高手请帮忙,关于判断盘符的批处理
autoexec.bat
for %%i in (z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a) do if exist %%i:\tools\715.715
if "%%i"=="c" goto M1 ;这句怎么写?
if "%%i"=="a" goto M1
:M1
.....
:M2
....
作者: haiou327    时间: 2008-2-28 13:15
你不是写好了!!!!!!!!!!!!!!!!!!!!!!!!!!
作者: haiou327    时间: 2008-2-28 13:17
if exist %%i:\tools\715.715这句不完整
作者: 715    时间: 2008-2-28 14:30
@echo off
set drv=notfound
for %%i in (z,y,x,w,v,u,t,s,r,q,p,o,n,m,l,k,j,i,h,g,f,e,d,c,b,a) do if exist %%i:\grub\715.715 set Drv=%%i
if "%Drv%"=="a" goto M1
if "%Drv%"=="b" goto M2
if "%Drv%"=="c" goto M3
if "%Drv%"=="d" goto M4

查了论坛的内容,应该是这样的
但有个问题,就是当检测A驱和B驱时,会显示press any key ...
要手动才能下去,能不能自动运行下去呢
作者: haiou327    时间: 2008-2-28 16:39
把A和B去掉,是软盘驱动器分区号.




欢迎光临 无忧启动论坛 (http://bbs.c3.wuyou.net/) Powered by Discuz! X3.3