• 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: Mounting and Dismounting local or server volumes on Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mounting and Dismounting local or server volumes on Tiger


  • Subject: Re: Mounting and Dismounting local or server volumes on Tiger
  • From: "J. Stewart" <email@hidden>
  • Date: Wed, 19 Oct 2005 05:06:12 -0400

On 10/18/05 at -0700 Dave Lyons said this

>> Should I understand "do shell script" is the only solution, and
>> that there is no direct AS command to mount  or dismount local
>> disks or volumes ?
>
>Yes, I believe so.
>
>"mount volume" is intended for "afp://" URLs, where AFP stands for
>Apple Filing Protocol.  In other words, AppleShare servers.  It can't
>help you mount a local, non-mounted volume.
>
>Finder's "eject" command works for the same disks that you could
>eject using the "Eject" menu item in Finder's File menu.


Here's a script works OMM . I wrote when I was having a few problems keeping several disks mounted. The script mounts both disks and the partitions on them.

As for usage, diskutil prefers the 'disk identifier' (or other forms) rather than the name of a disk. You can use "diskutil info 'disk identifier'" (i.e. disk2s2) in terminal to identify them, they are all listed in /dev.

    --> Cut <--
    set diskList to {{"Mac HD3", "disk2s2"}, {"Mac HD2", "disk2s3"}, {"OS9", "disk2s4"}, {"BigDisk", "disk3s9"}, {"Utility", "disk1s3"}, {"Backup", "disk1s5"}}
    set dl to list disks
    repeat with aDisk in diskList
        if (item 1 of aDisk) is not in dl then
            do shell script "diskutil mount " & (item 2 of aDisk)
            delay 2.0
        end if
    end repeat
    --> Cut <--

Any line in this script which starts at the left margin has been wrapped.
You may need to manually append such a line to the end of the preceeding line if it's a "hard" wrap.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Mounting and Dismounting local or server volumes on Tiger (From: Dave Lyons <email@hidden>)

  • Prev by Date: Re: Reading files
  • Next by Date: Re: Applescript-users Digest, Vol 2, Issue 687
  • Previous by thread: Re: Mounting and Dismounting local or server volumes on Tiger
  • Next by thread: Autoreply: Applescript-users Digest, Vol 2, Issue 679
  • Index(es):
    • Date
    • Thread