• 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: An easy one for you guys!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An easy one for you guys!


  • Subject: Re: An easy one for you guys!
  • From: Doug McNutt <email@hidden>
  • Date: Mon, 23 Sep 2013 11:51:49 -0600

At 10:00 -0500 9/23/13, Jeffrey Madson wrote:
>I am trying to write an AppleScript that will delete 7 files/folders. I am using shell commands like: do shell script "rm -r /Options/CAE". I'm running into two problems. 1) I need to add an additional command between each line that will move the script along even if the file is not there. 2) Some of the files such as the ones in Library/StartupItems will not delete because of permissions. Is there a way to delete them without having to incorporate my Admin. name and password into the script? Thanks for any advice!


Have a look at the shell tool osascript

You can use sudo osascript pointing to your AppleScript file  from a terminal window.

You can also put the applescript commands in a here document,  "<<", stored right in the shell script.
--

--> From the U S of A, the only socialist country that refuses to admit it. <--
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >An easy one for you guys! (From: Jeffrey Madson <email@hidden>)

  • Prev by Date: An easy one for you guys!
  • Next by Date: Re: An easy one for you guys!
  • Previous by thread: An easy one for you guys!
  • Next by thread: Re: An easy one for you guys!
  • Index(es):
    • Date
    • Thread