Author |
Message |
JayLo
|
Posted: Sat Jun 07, 2003 11:04 pm Post subject: detecting drives in turing |
|
|
is there a way to find out how many drives on a computer there are and their corresponding letters? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Dan
|
Posted: Sat Jun 07, 2003 11:35 pm Post subject: (No subject) |
|
|
off the top of my head i know of no easy way of doing it, you may beable to use the dir comands to check to see if a driver existe by trying to open it then seeing if you get a good value... |
Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |
|
|
|
|
void
|
Posted: Sun Jun 08, 2003 10:32 am Post subject: (No subject) |
|
|
basically just run all the letters from a to z as drives and keep a record in an array of what kind of value it returns...then do whatever you want now that u know which ones exist and which ones dont....
EDIT: Dan suggested the same thing...i just never bothered to read it when i posted this |
|
|
|
|
|
Andy
|
Posted: Sun Jun 08, 2003 1:02 pm Post subject: (No subject) |
|
|
ya just have a for loop
for i:65..90
end for
and just use chr(i) as a drive and open files |
|
|
|
|
|
Catalyst
|
Posted: Sun Jun 08, 2003 2:23 pm Post subject: (No subject) |
|
|
this detects drives
it wont detect the floppy or cd drives unless there is somthing in them
code: |
var dirCheck : int
for i : 97 .. 122
dirCheck := Dir.Open (chr (i) + ":\\")
if dirCheck = 0 then
put chr (i) + ":\\ does not exist"
else
put chr (i) + ":\\ does exist"
Dir.Close (dirCheck)
end if
end for |
|
|
|
|
|
|
Andy
|
Posted: Sun Jun 08, 2003 4:25 pm Post subject: (No subject) |
|
|
damn, got shutdown by catalyst once again... |
|
|
|
|
|
JayLo
|
Posted: Sun Jun 08, 2003 8:05 pm Post subject: (No subject) |
|
|
lol, he's so leet. he's catalyst. thanks a bunch, dude. |
|
|
|
|
|
Andy
|
Posted: Sun Jun 08, 2003 8:12 pm Post subject: (No subject) |
|
|
ugh, sucking upers, go catalyst, damn, y is he so good, catalyst come to massey, we need smart ppl |
|
|
|
|
|
Sponsor Sponsor
|
|
|
JayLo
|
Posted: Mon Jun 09, 2003 9:50 pm Post subject: (No subject) |
|
|
gotta love sucking up! |
|
|
|
|
|
Andy
|
Posted: Tue Jun 10, 2003 5:38 pm Post subject: (No subject) |
|
|
ya but u should suck up to somewhere useful like to tony or dan or even the psycho mod |
|
|
|
|
|
JayLo
|
Posted: Tue Jun 10, 2003 9:14 pm Post subject: (No subject) |
|
|
please, do explain "the psycho mod"? flame him up, yo. |
|
|
|
|
|
Andy
|
Posted: Wed Jun 11, 2003 3:35 pm Post subject: (No subject) |
|
|
no Asok, i said i was sorry AHHHHHHHHHHHHHHHHHHh
NOT THE FLAME THROWER!!!!!!!!!!!!!!!! |
|
|
|
|
|
|