Re: Selecting files in a list
Re: Selecting files in a list
- Subject: Re: Selecting files in a list
- From: "Bob.Kalbaugh" <email@hidden>
- Date: Wed, 26 Mar 2003 20:20:10 -0500
on 3/26/03 2:37 AM, Wade Williams at email@hidden wrote:
>
This is embarrassing, but it's driving me crazy.
>
>
How can I select files in a folder from a provided list of filenames?
>
>
I've tried:
>
>
set theFiles to {"input.txt", "license.txt"}
>
>
tell application "Finder"
>
open folder "path:to:my:folder"
>
set the selection to (files in theFiles)
>
end tell
>
>
which runs, but does not actually select the files.
>
>
I've tried this 50 different ways, but have been unsuccessful in
>
finding one that works.
>
>
Thanks,
>
>
Wade
The script below works for me. Hope it helps.
--
set theFiles to {"input.txt", "license.txt"}
set theFolder to "path:to:my:folder"
tell application "Finder"
open folder theFolder
select (files in folder theFolder whose name is in theFiles)
end tell
--
Bob.Kalbaugh
_______________________________________________
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.