• 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: aborting a running script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: aborting a running script


  • Subject: Re: aborting a running script
  • From: Christopher Stone <email@hidden>
  • Date: Mon, 28 Feb 2011 08:22:22 -0600

On Feb 28, 2011, at 06:31, Jim Brandt wrote:
Also, does anyone have a way to build a list of all files regressively in folders below the current level?
______________________________________________________________________

Hey Jim,

set f to "YOUR folder alias"

tell application "Finder"
try
# For a list of aliases:
set itemList to (items of entire contents of f) as alias list


# For a list of path strings:
set AppleScript's text item delimiters to return
set itemList2 to text items of (((items of entire contents of f) as alias list) as string)


on error errMsg number errNum
set sep to "=============================="
set e to sep & return & "Error: " & errMsg & return & sep & return ¬
& "Error Number: " & errNum & return & sep
beep
display dialog e
end try
end tell

Keep in mind that 'entire contents' gets slow as the hierarchy gets big.  'as alias list' does improve the speed considerably though.

--
Chris
 _______________________________________________
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: 
 >aborting a running script (From: Jim Brandt <email@hidden>)

  • Prev by Date: Re: aborting a running script
  • Next by Date: Re: aborting a running script
  • Previous by thread: Re: aborting a running script
  • Next by thread: Re: aborting a running script
  • Index(es):
    • Date
    • Thread