Hi people, I need some help again.
The program I am writing uses a large number of small sound files. I
want to give the user the option of loading all these onto their hard
drive or to access them from the program CD.
To do this I need to determine if the program CD is in the drive.
On a Mac this is easy. I just use the code
n=volumeCount-1
for i = 0 to n
volName=volume(i).name
if left(volName,17)="Aussie SpellForce" then
flag = true
index = i
end if
next
However on a Win32 machine
volume(i).name
just yields D: etc and I can't tell if it is my program CD or another
one in the drive.
I tried
n=volumeCount-1
for i = 0 to n
s= volume(i).name
f=getfolderitem(volume(i).name).child("SFDev409") //SFDev409 is a
file on top level of CDROM
if not(f =nil) then
if f.exists then
statictext1.text = "CDROM found"
end if
end if
next
but couldn't get this to work even on a Mac, f was always nil.
Any ideas or suggestions please?
Regards
Karl Holmes
|