Re: select any cd (WAS:applescript-users digest, Vol 2 #880 - 16 msgs)
Re: select any cd (WAS:applescript-users digest, Vol 2 #880 - 16 msgs)
- Subject: Re: select any cd (WAS:applescript-users digest, Vol 2 #880 - 16 msgs)
- From: David Reynolds <email@hidden>
- Date: Tue, 24 Jul 2001 14:58:40 -0700
on 2001.07.20 11:38, John McElwain said:
>
>> How would one select any cd (not by name) without selecting other disks or
>
>> folders?
>
>
>
> Try something like this:
>
>
>
> every disk whose free space = 0 ,
>
> and capacity > 6.5E+8 ,
>
> and capacity < 7.0E+8
>
>
>
> The "free space" expression includes any read-only disks,the lower capacity
>
> limit assumes that the CD is more or less full, and the upper limit should
>
> ignore DVDs and such.
>
>
>
> Does anyone happen to know what the actual maximum number of bytes an HFS (or
>
> HFS+) CD can hold?
>
>
The problem with the above approach is that a CD volume could have a little
>
as 14 Mb of capacity.
>
>
Akua's Sweets Volume Info Record contains a property called vol device kind.
>
There must be a more elegant way to approach this, but the following seems
>
to work...
<snip>
For a plain vanilla solution, look for any removable media that is read-only
and is less than 700MB. It'll end up including locked floppies and locked
Zips, but I haven't used a floppy other than as a Frisbee for about a year,
and the click-of-death left me gun-shy of the other...
(MacOS 9.1, AS 1.6, no 3rd party osaxen)
--begin script--
tell application "Finder"
set theDiskList to every disk whose ejectable is true and (opt+enter)
protected is true and capacity is less than (700 * 1048576)
end tell
--end script--
Or this one I just found...
--begin script--
tell application "Finder"
set theDiskList to every disk whose description starts with "CD-ROM"
end tell
--end script--