I need a mac computer to locate a file on its CD drive. I don't know how to write the mac path statement. The operating system is OS Lion, by the way. Basically, the file resides on a CD called July Research in a folder called JFYData. Inside that folder is a file named 31854%75.rtf. If I wanted the program on the Mac to access the CD in the drive, find the TstData folder, and see if it contains 31854%75.rtf, what is the Mac syntax for the path statement?
Thanks for whatever help you can give me with this.
Dewey
If you know the drive is named July Research and that it is mounted (the disc is inserted in the drive), then you can simply use:
tPath = "July Research:JFYData:31854%75.rtf"
If you want to be sure, I'd suggest using Buddy API:
sTargetDisk = EMPTY
lDisks = baDiskList()
repeat with aDisk in lDisks
if baDiskInfo( aDisk, "type" ) = "CD-ROM" then
-- this is probably the disk you're looking for, but just to be sure:
if baDiskInfo( aDisk, "name" ) = "July Research" then
sTargetDisk = aDisk
end if
end if
end repeat
-- the string variable sTargetDisk, if non-empty, contains the drive you are looking for
Sean, thank you for sharing your time and exptertise to help me with this issue. One part I don't quite understand. You stated, "If you know the drive is named July Research", etc. I don't know what the drive might be named, but the CD itself is named "July Research". So, it sounds as if that negates the use of the simple tPath statement you gave me. Is that right?
Thanks again.
Dewey
I don't know what the drive might be named, but the CD itself is named "July Research". So, it sounds as if that negates the use of the simple tPath statement you gave me. Is that right?
No. What I was driving at is that when you insert a CD/DVD in a Mac the volume mounts and is assigned the name of the disc.
North America
Europe, Middle East and Africa
Asia Pacific