中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-04 10:07
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » How to use the Exist subcommand to tell whether there is a disc in the CD-ROM drive?
Printable Version  836 / 2
Floor1 qtdzc Posted 2007-04-28 04:33
新手上路 Posts 4 Credits 10
My computer has two CD-ROM drives, F: and G:. There is a disc with a Test.txt file placed in its root directory, and I want to determine in a batch file which CD-ROM drive this disc is actually in. When there is no disc in drive F:, executing the following statement causes an error:
if exist f:\nul echo ffff
And it reports the following information:
CDR101:Not ready reading drive F
Abort,Retry,Falt?
I'd like to ask all the experts, how should I avoid this runtime error?
Thanks!
Floor2 ansipeter Posted 2007-04-28 04:42
中级用户 Posts 130 Credits 269
OP, which system are you using???
Floor3 qtdzc Posted 2007-04-28 05:25
新手上路 Posts 4 Credits 10
Thanks for ansipeter's attention! I'm using DOS7.1
. But my problem has already been solved. Thank you
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023