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

RedDog002

macrumors newbie
Original poster
Feb 2, 2010
11
0
Hi,

I need your help. I've got these .png-files that I need to look up in .txt-files, if there in it or not. A few days ago, it worked very well with Finder. But since a few days, the lists don't appear anymore in the Finder window.

Can Anyone help me, please ?

Nobody ?
 
I don't think anyone understands the question.:confused:

You have a .txt file which is a list of .png files and you want to search it?

Open in TextEdit and do a search.



You say 'In Finder'? Are you using Sherlock and want to find the .png occurances?

Is this a listing of multiple files that have since disappeared?



Your post is too cryptic for anyone to offer much help.
 
I'm sorry. :)

I have a folder with 400 pictures (.png), and I have 8 lists (.txt). In these lists are those pictures maybe mentioned. I've got to find out if they are mentioned or not in those lists.
I had before already 200 pictures checked with Finder, and it went well. But now the Finder only shows the picture and not the lists where this picture is mentioned in. Although this picture is mentioned in some lists.

Can anybody help me ?
 
So you're saying Spotlight isn't searching the content of txt files? Maybe you need to make it re-index your files (you can probably google for it or find it on the forums). Since you just have a few files you need to search though I'd just open them up in TextEdit/YourFavoriteTextEditor and use the program's own search.
 
So you're saying Spotlight isn't searching the content of txt files? Maybe you need to make it re-index your files (you can probably google for it or find it on the forums). Since you just have a few files you need to search though I'd just open them up in TextEdit/YourFavoriteTextEditor and use the program's own search.


We're talking about 400 files in 8 lists. I got to check every list then. That will take a lot of time...

I'll re-index my files, I guess.

*EDIT it didn't work... :(
 
400 files in 8 lists...

you need a way to save time,hehe

Exactly!
Before the last update (I guess), it went so easy. Just put the name of the .png-file, and you saw every place or file (.txt) where this name was mentioned. Now it looks only after file-names and no more the contents of texts.

Is there a way that I can configurate this maybe ?
 
Whenever you search with Finder, just click the option to search Contents instead of File Name to search the contents of files:
Picture 1.jpg
As you can see from this search, the highlighted file doesn't have png in the name, but it does in the contents.
 
Whenever you search with Finder, just click the option to search Contents instead of File Name to search the contents of files:
As you can see from this search, the highlighted file doesn't have png in the name, but it does in the contents.

I did that as well (Contents), but still no results. Only the .png-file itselfs shows. But no .txt-files. Although the .png-filesname is mentioned in the list.
 
Sounds like you need to reindex your drive

System Preferences > Spotlight > Privacy

Drag your "Macintosh HD" from your desktop to the Privacy window, then remove it from the list.
 
I'm not sure why it's not working for you, but I just thought I would throw out a suggestion: you might consider writing a script of some sort to do this job.
 
Sounds like you need to reindex your drive

System Preferences > Spotlight > Privacy

Drag your "Macintosh HD" from your desktop to the Privacy window, then remove it from the list.

it's by pressing on the sing - , right ?
 
Go into terminal and navigate to the folder with your .png and .txt files.

type: grep (search-string) *.txt
 
Go into terminal and navigate to the folder with your .png and .txt files.

type: grep (search-string) *.txt

This is in danger of becoming my answer to everything, but go to Terminal

and do

Code:
sudo mdutil -E -i on /

To rebuild the spotlight metadata.

I've just realised that GGJ has already suggested this by different means, that's very weird.
 
It didn't help. :(

How do I write (?) a script, ScoobyMcDoo ?

It sounds like you have a big repetitive task on your hands in which case a script would be very helpful to you. Spotlight or not, writing an appleScript may be worth your while.

Can you describe the process you're going to be doing?
 
It sounds like you have a big repetitive task on your hands in which case a script would be very helpful to you. Spotlight or not, writing an appleScript may be worth your while.

Can you describe the process you're going to be doing?

I've got a folder with 400 pictures (.png) and I've got 12 lists (.txt). I've got to check picture by picture, if they're included in one or more of those lists.
All of those pictures have a number.
 
I've got a folder with 400 pictures (.png) and I've got 12 lists (.txt). I've got to check picture by picture, if they're included in one or more of those lists.
All of those pictures have a number.
How are the entries separated in the text file? Is each one on its own line?

A script to read in all of the lists and loop through a folder of images, moving them to one folder if on the list and moving them to another if not shouldn't be a big problem. It could even write an output listing the matched and unmatched without any problem.
 
Every picture is named with a number.
In the list you've got the number, the name of the person in the picture, his position,... And each one has his own line in the list.
Most of the pictures are mentioned in several lists. Those lists are made every year. So next year we'll have 13 lists, if you get what I mean.
My job is to put the pictures in a folder (that I have created) with the name of the latest list where the picture is mentioned in.

Is this clear ? :)
 
Every picture is named with a number.
In the list you've got the number, the name of the person in the picture, his position,... And each one has his own line in the list.
Most of the pictures are mentioned in several lists. Those lists are made every year. So next year we'll have 13 lists, if you get what I mean.
My job is to put the pictures in a folder (that I have created) with the name of the latest list where the picture is mentioned in.

Is this clear ? :)
And what do you do if the photo is mentioned in more than one list?
 
I'll take the latest list. I'll put it in that folder. ;)

So the script needs to do all of these things.

1)Be shown where the folder is with the photos.
2)Be shown where the text files are.
3)Read each of the text files into separate lists (I'd put those lists inside another list in the reverse date order)
4)Make folders associated with each list
5)loop through each photo in the folder and search for its name in the lists, copy it to the folder if there's a match and move on to the next photo (of course there's no reason why it shouldn't copy it to each of the folders where it's mentioned in a list.

Here's a few useful articles to get you started.

User interaction basics.
Ben's Applescript Snippets

There's loads out there, tutorials, example script. Have a read if you fancy the challenge. And come back here to ask questions if you're really stuck. :)
 
So the script needs to do all of these things.

1)Be shown where the folder is with the photos.
2)Be shown where the text files are.
3)Read each of the text files into separate lists (I'd put those lists inside another list in the reverse date order)
4)Make folders associated with each list
5)loop through each photo in the folder and search for its name in the lists, copy it to the folder if there's a match and move on to the next photo (of course there's no reason why it shouldn't copy it to each of the folders where it's mentioned in a list.

Here's a few useful articles to get you started.

User interaction basics.
Ben's Applescript Snippets

There's loads out there, tutorials, example script. Have a read if you fancy the challenge. And come back here to ask questions if you're really stuck. :)

That's it!
Thanks for the help.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.