• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Mac OS X] How to tell external disk mounted?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mac OS X] How to tell external disk mounted?


  • Subject: Re: [Mac OS X] How to tell external disk mounted?
  • From: Andrew Oliver <email@hidden>
  • Date: Tue, 13 Apr 2004 13:10:50 -0700

On 4/13/04 12:28 PM, "Simon Forster" <email@hidden> wrote:

> So, what's the best way of checking if the server's HD "Macintosh HD"
> is mounted?

Check the 'local volume' flag property of the disk to see if it's local or
not, e.g.:

tell application "Finder"
set mountedDisks to name of every disk whose local volume is false
if mountedDisks does not contain "Macintosh HD" then
-- disk is not mounted
end if
end tell

Andrew
:)

> One of my machines has turned up its toes so I've got to move
> half-a-dozen scripts which usually run unattended at 3:00 am.
>
> Problem: The machine I'm testing these scripts on has a hard drive
> named "Macintosh HD". Part of the script effectively says:
>
> if not (disk "Macintosh HD" exists) then
>
> ...which worked fine on the old machine but, as a test, fails on the
> current machine due to the identically named HDs.
>
> No probs, I'll check /Volumes/ - but that has a symbolic link to root
> of the current drive.
>
> So, what's the best way of checking if the server's HD "Macintosh HD"
> is mounted?
>
> TIA
>
> Simon Forster
> _____________________________________________________
> LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
> Tel: +44 (0)70 9230 5244 Fax: +44 (0)70 9230 5247
> _____________________________________________________
> _______________________________________________
> 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.
_______________________________________________
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.


References: 
 >[Mac OS X] How to tell external disk mounted? (From: Simon Forster <email@hidden>)

  • Prev by Date: InDesign tags, Unicode, etc.
  • Next by Date: Re: Choose Folder Problem
  • Previous by thread: [Mac OS X] How to tell external disk mounted?
  • Next by thread: Change of file creation date
  • Index(es):
    • Date
    • Thread