Board index » delphi » defeating drive not ready errors

defeating drive not ready errors

I am checking a filename for validity.  If the filename is d:\file.ext,
and drive d: just happens to be my empty CD, FileExists gives a windows
system error (drive not ready; well, duh!).  Anybody know how to work
around this to check for invalid drives as well as not ready drives?

Paul

 

Re:defeating drive not ready errors


There are so many questions posted in this newsgroup which have already
been answered by means of Technical Information sheets (TI) on Borland's
web site. I know Borland's site often seems sleepy, but usually you can get
through on the twelve attempt.
There is a TI (TI2857) entitled 'How to check if a drive is ready' which
attempts to access a drive, but does not throw up erro messages everywhere
if there's no disk in the drive.

Good luck
Jonathan

Paul Billings <p...@topia.com> wrote in article <32A4626B.3...@topia.com>...

Quote
> I am checking a filename for validity.  If the filename is d:\file.ext,
> and drive d: just happens to be my empty CD, FileExists gives a windows
> system error (drive not ready; well, duh!).  Anybody know how to work
> around this to check for invalid drives as well as not ready drives?

> Paul

Other Threads