Given that I have my internal hard drive, an external with multiple partitions and an iDisk, how can I tell from AppleScript which is the iDisk?
Hi,
the iDisk can be identified by its format (WebDAV)
This:
tell application "Finder"
format of disk "iDiskname"
end tell
returns: Mac OS Extended format
Just like my startup disk.
doug
on my machine (10.5.8) it returns the proper disk
tell application "Finder"
1st disk whose format is WebDAV format
end tell
I get an error:
Can’t get 1.
10.6.1
doug
tell application "Finder"
try
1st disk whose format is WebDAV format
on error
-- iDisk not mounted
end try
end tell
of course I assume that the iDisk is mounted
How about:
tell application "Finder"
try
set myDisk to first disk whose URL contains "http://idisk.mac.com/"
on error theErr
display alert "iDisk not located" message theErr
-- no iDisk disk mounted
end try
end tell
This would avoid the issue of there possibly being more than one WebDAV disk mounted.
Best wishes
John M
actually the URL of a mounted iDisk starts also with /Volumes (at least on 10.5.8)