• 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: putting a partition away in OSX
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: putting a partition away in OSX


  • Subject: Re: putting a partition away in OSX
  • From: Michael Terry <email@hidden>
  • Date: Wed, 07 Aug 2002 13:57:38 -0700

On 8/6/02 9:51 PM, "email@hidden" <email@hidden> wrote:

> I have been using a simple script in OS 9 in the Startup Items folder
> which put away an OSX partition. It went as follows:
>
> tell application "Finder"
> activate
> if disk "disk_name" exists then (select disk "disk_name") put away
> asking (false)
> end tell
>
> I would like to use this type of script in OSX to put away the OS 9
> partition but cannot seem to locate the correct syntax for OSX. Is this
> possible? I am still very green with applescript so please go easy on me.

property volName : "Never Never Land"
property theSwitch : "-e"

set mountData to do shell script "/sbin/mount"
if volName is in mountData then
set AppleScript's text item delimiters to return
repeat with i in mountData's text items
if volName is in i then set devName to i
end repeat
set devName to word 2 of devName
set AppleScript's text item delimiters to ""
do shell script "/usr/sbin/disktool " & theSwitch & space & devName & "
0"
end if

Put your disk name in volName.

> mark

Mike
_______________________________________________
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: 
 >putting a partition away in OSX (From: email@hidden)

  • Prev by Date: Re: Scripting EIMS over a LAN
  • Next by Date: Re: selective string-replace
  • Previous by thread: Re: putting a partition away in OSX
  • Next by thread: RE: Scripting Acrobat? [PDF -> JPG files]
  • Index(es):
    • Date
    • Thread