• 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: 2nd try: Choose folder dialog and then process contents?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2nd try: Choose folder dialog and then process contents?


  • Subject: Re: 2nd try: Choose folder dialog and then process contents?
  • From: Mr Tea <email@hidden>
  • Date: Wed, 06 Oct 2004 22:23:08 +0100

This from Aaron Rosenblum - dated 6/10/04 8ยท57 pm:

> set this_folder to (choose folder with prompt "Pick the folder
> containing the files to process:") as string
> tell application "System Events"
> set these_items to every file of folder this_folder
> end tell


I would say that you don't need to convert the result of 'choose folder' to
a string, and you'd be better off using the Finder than system events.

Also, if you want the script to be recursive, specify 'every item' rather
than 'every file' to catch folders too.

Further down the script, the command to process the file/folder is expecting
to receive an alias, but your script is passing it an item reference. Change
the above snippet from your script to...

set this_folder to (choose folder with prompt "Pick the folder
containing the files to process:")
tell application "Finder"
    set these_items to every item of this_folder as alias list
end tell

...and all should be well.


Just don't expect it to be too snappy on big folder directories though...
:-)



Nick
pp Mr Tea

--


 _______________________________________________
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

  • Follow-Ups:
    • Re: 2nd try: Choose folder dialog and then process contents?
      • From: Michelle Steiner <email@hidden>
References: 
 >2nd try: Choose folder dialog and then process contents? (From: Aaron Rosenblum <email@hidden>)

  • Prev by Date: Re: Word length
  • Next by Date: Re: 2nd try: Choose folder dialog and then process contents?
  • Previous by thread: Re: 2nd try: Choose folder dialog and then process contents?
  • Next by thread: Re: 2nd try: Choose folder dialog and then process contents?
  • Index(es):
    • Date
    • Thread