1 Reply Latest reply: Nov 11, 2012 9:34 AM by Jacques Rioux
scrabble755 Level 1 Level 1 (0 points)

I have a folder of images from which i'd like to select only a portion of them.  The ones i want are in a txt file as a list.

 

Can anyone help me figure out how to do this? 

 

Once they are selected i'll manually copy or move them as needed.

 

my folder has

 

a.img

b.img

c.img

.

.

.

z.img

 

I want to select

 

c.img

g.img

k.img


MacBook Pro, Mac OS X (10.7.4)
  • 1. Re: Automator to select a specified list of files in a folder
    Jacques Rioux Level 4 Level 4 (1,960 points)

    Hi,

     

    You can use this AppleScript :

     

    read (choose file with prompt "Select the TEXT file wich contains names") as «class utf8»
    set tNames to paragraphs of the result
    tell application "Finder" to tell target of front Finder window
          select (files whose name is in tNames)
    end tell
    

     

    I presume that the names in the text file contain the name extension

    It works if the encoding of the plain text file is  "UTF8", if the encoding is "MacRoman" removes  as «class utf8» in the script.

    The source folder is the front Finder window.