How to select files in Finder from a text list

Joined
Jul 8, 2014
Messages
1
Reaction score
0
hello,

i've tried to figure this out by myself but to be honest i haven't used Applescript in over a decade :) found some bits and pieces on the interweb but can't make it work somehow.

What i want to do is simple:

i have several lists of files in text format like this:

2453.eps
2426.eps
2424.eps
2423.eps
2422.eps
2421.eps
2419.eps
2259.eps

I need to apply different tags or move files to different folders, that part i can do manually but i would like Applescript to select the files in the finder for me since this is the tedious part .. i have sevral thousands of files so finding and selecting them manually is going to be a pain.

i have tried crating an automator action with an Applescript i found in some forum thread but it does not work, when i run this action the finder and automator freezes and nothing happens until i forec relaunch the Finder.

Here's the script i am trying:

on run {input, parameters}

tell application "Finder"
select (every item of window 1 whose name is in {"2419.eps", "2629.eps", "2673.eps", "2674.eps", "2828.eps", "2830.eps", "2831.eps", "2832.eps", "2833.eps", "2834.eps", "2835.eps", "2836.eps", "2837.eps", "2844A.eps", "2851.eps", "2855.eps", "2857.eps", "2858.eps", "2859.eps", "2862.eps", "2863.eps", "2865.eps", "2866.eps", "2867.eps", "2880.eps", "2881.eps", "2882.eps", "2883.eps", "2884.eps", "2886.eps", "2889.eps", "3037.eps", "3059.eps", "3080.eps", "3081.eps", "3082.eps", "3083.eps", "3084.eps", "3085.eps", "3086.eps", "3087.eps", "3088.eps", "3089.eps", "3090.eps", "3091.eps", "3092.eps", "3093.eps", "3094.eps", "3095.eps", "3096.eps", "3097.eps", "3098.eps", "3099.eps", "3100.eps", "3101.eps", "3102.eps", "3103.eps", "3104.eps", "3105.eps", "3106.eps", "3107.eps", "3108.eps", "3109.eps", "3110.eps", "3111.eps", "3112.eps", "3113.eps", "3114.eps", "3115.eps", "3116.eps", "3117.eps", "3118.eps", "3119.eps", "3124.eps", "3125.eps"})
end tell


return input
end run


What am i missing ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top