China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-30 16:33
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » How to use findcd to find the correct CD drive letter??? View 1,873 Replies 5
Original Poster Posted 2006-08-22 11:32 ·  中国 江西 南昌 电信
初级用户
Credits 78
Posts 17
Joined 2005-11-18 22:01
20-year member
UID 45508
Status Offline
It is that there is more than one CD-ROM (or DVD-ROM) installed on a machine. findcd seems to only be able to find the main CD-ROM. If the disc is placed in a secondary CD-ROM, it cannot be found. Then how can we find the correct drive letter where the disc is located? For example: if the disc is placed in drive E, the drive letter is E; if it is placed in drive F, the drive letter is F. Thanks.
Floor 2 Posted 2006-08-22 11:38 ·  加拿大 Bell
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Not adding parameters or using findcd 1 means the first optical drive; the second optical drive should use findcd 2, and so on.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 3 Posted 2006-08-22 11:41 ·  中国 江西 南昌 电信
初级用户
Credits 78
Posts 17
Joined 2005-11-18 22:01
20-year member
UID 45508
Status Offline
Thanks to the person above. I have two optical drives. Of course, I usually put it in the first one now, but if I put it in the second optical drive, how to make it automatically and correctly find the drive letter of the optical drive where the disc is located.
Floor 4 Posted 2006-08-22 11:50 ·  加拿大 Bell
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Didn't I already say above that you should use findcd 2 to find the drive letter of the second CD-ROM? Have you tried it?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 5 Posted 2006-08-22 14:45 ·  中国 江西 南昌 电信
初级用户
Credits 78
Posts 17
Joined 2005-11-18 22:01
20-year member
UID 45508
Status Offline
It seems that findcd uses %CDROM1%, %CDROM2%, ..., global variables to represent CD - ROM drive letters. My level is limited. The following autoexec.bat is effective for the first CD - ROM, but invalid for the second one. May I ask how to modify it again? Thank you.

@ECHO Off
PROMPT $p$g
LH Shsucdx.exe /D:IDE-CD /K /M:15 >NUL
LH FINDCD /s >nul
IF "%CDROM%"=="" GOTO no_cdrom

lh a:\SMARTDRV 4096
CLS
path %CDROM1%\;a:\;
%CDROM1%
CD\TOOLS\DOSLFN
LH DOSLFN.COM
CD\TOOLS
LH TW.exe/NP
CD\TOOLS\VC
rem if not exist VC.com goto NO_FILE
VC.COM
GOTO EXIT

:no_cdrom
echo error:no_cdrom
a:\
GOTO EXIT

:NO_FILE
ECHO ERROR:NO FOUND DM.COM!
pause
GOTO EXIT

:EXIT
Floor 6 Posted 2006-08-22 22:03 ·  美国
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
findcd was compiled by me a few years ago. There are two expressions: one is in the form of findcd [n], where n is a number, indicating that the nth CD-ROM drive letter is displayed and stored in %CDROM%; the other is in the form of findcd /s, which directly stores all CD-ROM drive letters into variables. At first, findcd only supported the former, and later I added support for the latter at the request of a certain netizen.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Forum Jump: