in reply to Re: Getting list of drives on pc in thread Getting list of drives on pc
I do have a Windows box to test it on and it looks like this largely works. A couple of notes though. My floppy drive is A:, and it brought up a message (twice! and I cancelled both times) indicating that there was no disk in the A: drive. This would be awkward for a non-interactive user. Second thing, my CD drive is D:, and it completely skipped over that when the drive was empty, not recognizing it at all. No error message, no nothing. However, with a CD in the drive, it recognized it the same was as for all the fixed drives. So, caveat emptor with removable-media drives.
Re: Re: Re: Getting list of drives on pc
by belden (Friar) on Apr 16, 2003 at 23:03 UTC
|
| [reply] |
Re^3: Getting list of drives on pc
by Coruscate (Sexton) on Apr 16, 2003 at 23:03 UTC
|
Ah yes, I could have told you about the not recognizing the empty drive. It will only return a list of drives that currently have a filesystem mounted on it. It simply tries to open the root directory of the drive, and if executed successfully, adds it to the list. As for the alert telling you about the empty floppy drive, this I could have expected but did not see in my use of that snippet. I believe it's because I used it in a CGI script ;)
If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, please reply to this node or /msg me to inform me as to what is wrong with the post, so that I may update the node to the best of my ability.
| [reply] |
Re^3: Getting list of drives on pc (no prompting)
by tye (Sage) on Apr 17, 2003 at 15:17 UTC
|
| [reply] |
|