Re: 2nd try: Choose folder dialog and then process contents?
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