Automator Puzzle: How Do I Extract Certain Files (specified In A List) From A Large Repository?


I have large collection of picture files in a hierarchical directory.
From this I need to extract (copy) certain files - their filenames are listed in a text file.
How can this be done with automator?

Extracting files based on search criteria I found to be easy in a workflow or as a service:
action 1. Find finder items (with names containing xyz)
action 2. Copy Finder items
but how do I pass on the list of filenames as an argument/variable?

Or do I need to create a programme like
- get filename from list
- find finder item with this filename
- copy this file to targetdirectory

Grateful for any ideas, E


Well I'd try following Unix commands: find (to search the files) and the cpio to copy the the files to another directory.


$ cd source; find . \( -name '*xyz*' -o -name '*abc*' \) -print0|cpio -0adpm target

(I did not try that, but is should work. You might have to use absolute directory names).