Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

noty

macrumors member
Original poster
Sep 7, 2005
74
17
I have quite a tedious task ahead of me at work and I'm wondering if there is an app that would make it easier.

I have a list of just over 500 images I need to find on a networked drive. Each image is named an 8 digit filename. Is there any app that could read the list and returned results without me having to enter each image number individually? Also, the list is not a spreadsheet but plain text, they are in no particular order and I am using Tiger.

Here is an example of what the list looks like

12345678
12345679
12345670
12345671
12345672

Any help would be appreciated, thanks.
 
What do you mean by "find"? For example, what do want to do with the image named 12345678 when you find it? What's the end result of what you are doing?
 
What do you mean by "find"? For example, what do want to do with the image named 12345678 when you find it? What's the end result of what you are doing?

I want copies of all the images in one folder.

The drive that I am searching contains thousands of images. So I want to find these 500 images and copy them into a separate folder.
 
You should be able to use an Applescript to help with this - I'm very much a noob but this seems to work for me:

Code:
try
	set theSource to (choose folder with prompt "Choose a source.")
	set theDestination to (choose folder with prompt "Choose a destination.")
	set textFile to (choose file with prompt "Choose a text file." without invisibles)
	
	tell application "TextEdit"
		open textFile
		set fileNames to every paragraph of (read textFile as string)
		
		close document 1
	end tell
	
	tell application "Finder"
		duplicate (every item whose name is in fileNames) of theSource to theDestination
	end tell
on error theError
	display dialog theError buttons {"OK"} default button 1
end try

If you open Script Editor (in Applications/Applescript/) and paste in the code, click Run, it will display pop-up boxes for the source (where your files are located), the destination (where you want to copy them) and the text file that contains your list.

All being well, it should copy them straight into your desired folder - however, it does require any hidden extensions such as .jpg be included in the list of names. If you need to do this and they're all the same type, you can use BBEdit's Find and Replace tool to add it to every line - type \r in the search field and .jpg\r (for example) in the replace field, and click replace all.

It's certainly not the most elegant of solutions, I'm sure somebody will be able to point you to something better if doesn't work out. :)
 
Thanks!

karenflower,

Thanks so much for your help. You just saved me hours of work this week. I tried the script with some test images on my home computer and it worked great. I'm surprised I haven't been able to find an app that does this. I have to do this type of thing at least 3 times a month but with a lot fewer images.

Thanks again.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.