Re: list disks on Panther
Re: list disks on Panther
- Subject: Re: list disks on Panther
- From: Nigel Smith <email@hidden>
- Date: Wed, 10 Dec 2003 17:24:03 +0000
On 30/11/03 10:58, "Thomas C." <email@hidden> wrote:
>
The command list disks on Panther returns all the mounted disk (as
>
usual) but it also returns at the end of the list the item "Network" !
>
Is this normal ? "Network" is not a physically mounted disk...
>
And it didn't do that in Jaguar so that makes on of my script running
>
ok on Jaguar but not on Panther.
>
I suppose the best way to make my script working on the two systems is :
>
>
if last item of list_disks is "Network" then
>
set list_disks to (reverse of (rest of (reverse of list_disks)))
>
end if
>
>
Right ?
No, 'fraid not. "Network" comes up after local partitions, but before
mounted network shares on my 10.3 machine. The disks *appear* to be listed
in the order in which they are mounted, so after mounting two network shares
followed by an external FW drive I get:
{"MacHD", "Swap_Partition", "Network", "share1", "share2", "FW_Disk"}
So maybe:
set diskList to {}
repeat with eachDisk in (list disks)
set tmp to contents of eachDisk
if tmp is not "Network" then copy tmp to end of diskList
end repeat
return diskList
And before you use:
do shell script "ls /Volumes"
...note that command does not list all mounted volumes -- those accessed by
"browsing" Network/Local will not be included.
HTH,
Nigel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.