-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|605|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> File Access


 
Dan
Created : 02 November 2018
Edited : 02 November 2018
System : Windows
Language : Blitz

GetDrive$ - create a list of available drive letters

Create a list of available drive letters


 

Comments


Friday, 02 November 2018, 06:50
Jayenkai
Not recommended.

My system includes various network drives that would all cause the code, and machine, to stutter and pause whilst it works everything out.
The same goes for floppy and cd drives.
Friday, 02 November 2018, 08:10
Dan
Ok, good to know. Do you know any other/better solution ?

I could exclude the AB drives by making a string including all wanted letters "CDE...XYZ" (which was my first attempt).

As my ram disk resides on the letter .... R ...

Btw, have you tested the code ? i do not have the Floppies on this PC ! And the CD rom (with CD inside) does not react to this check (its shown as recogized by the code)
Friday, 02 November 2018, 09:10
Jayenkai
I haven't had a floppy drive in any systems for a long time, but I always code as if something like that might occur. Used to be as frustrating as hell, back in the day!
Friday, 02 November 2018, 09:27
Dan

Used to be as ...


I remeber that.

The other option would be, to include all the letters, like the old dos file requesters have had them, and hope that the user knows which letter is the 'right' one.
Friday, 02 November 2018, 09:30
Jayenkai
IMO, If you're making something with functionality to allow users to access all the drives and paths and things, then you're probably dealing with a power user from the get-go.
If you don't think the end user can "cope" with drive letters, then you're probably going too far, expecting them to do so.

Decide from point A whether the user is tech-savvy or not.