Checking for media in drives
Ken Ray
kray at sonsothunder.com
Mon Dec 23 22:19:01 EST 2002
Jack,
You can use the DriveReady command line utility at
http://www.jsifaq.com/dl/drvready.zip. It must be run in a batch file
though, so create a batch file like "testa.bat" and put the following in it:
drvready.exe a: /q
@echo %ERRORLEVEL%
Then call the batch file from the shell() command in MC. If it returns a 1,
there is a disk in the drive. If it returns a 0, there is no disk in the
drive. It does it silently, so there's not error dialogs or "please put in a
disk" dialogs.
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: "Braintree Athletics" <rarickj at btathletics.com>
To: <metacard at lists.runrev.com>
Sent: Monday, December 23, 2002 6:40 PM
Subject: Checking for media in drives
> Putting "the drives" or "the volumes" will give you a list of available
drives
> with media in MacOS. In win95, 98 and XP you get a list of all
mechanically
> attached equipment. If you then do a "If there is a:/mydisk/myfolder then
..."
> line of code you get some whirling and clicking in 95 and 98 - but no
error
> message from an empty floppy drive. In XP if you check for a folder or
file in
> a drive that does not contain media - you get a system error message from
XP.
>
> Is there any way in XP (and 95/98) to check to see if there is media in a
drive
> without getting an error message?
>
> Thanks for your help!
>
> Jack Rarick
> Braintree Athletic Systems
>
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>
More information about the metacard
mailing list