Finder doesn't look in .txt-files

Discussion in 'macOS' started by RedDog002, Feb 2, 2010.

  1. RedDog002 macrumors newbie

    Joined:
    Feb 2, 2010
    #1
    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 ?
     
  2. mstrze macrumors 68000

    Joined:
    Nov 6, 2009
    #2
    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.
     
  3. RedDog002 thread starter macrumors newbie

    Joined:
    Feb 2, 2010
    #3
    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 ?
     
  4. apfhex macrumors 68030

    apfhex

    Joined:
    Aug 8, 2006
    Location:
    Northern California
    #4
    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.
     
  5. RedDog002 thread starter macrumors newbie

    Joined:
    Feb 2, 2010
    #5

    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... :(
     
  6. asmore macrumors newbie

    asmore

    Joined:
    Jan 31, 2010
    #6
    400 files in 8 lists...

    you need a way to save time,hehe
     
  7. RedDog002 thread starter macrumors newbie

    Joined:
    Feb 2, 2010
    #7
    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 ?
     
  8. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #8
    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.
     
  9. RedDog002 thread starter macrumors newbie

    Joined:
    Feb 2, 2010
    #9
    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.
     
  10. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #10
    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.
     
  11. ScoobyMcDoo macrumors 65816

    Joined:
    Nov 26, 2007
    Location:
    Austin, TX
    #11
    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.
     
  12. RedDog002 thread starter macrumors newbie

    Joined:
    Feb 2, 2010
    #12
    it's by pressing on the sing - , right ?
     
  13. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #13
    yes
     
  14. RedDog002 thread starter macrumors newbie

    Joined:
    Feb 2, 2010
    #14
    It didn't help. :(

    How do I write (?) a script, ScoobyMcDoo ?
     
  15. Ganesha macrumors regular

    Joined:
    Aug 4, 2009
    #15
    Go into terminal and navigate to the folder with your .png and .txt files.

    type: grep (search-string) *.txt
     
  16. Denarius macrumors 6502a

    Denarius

    Joined:
    Feb 5, 2008
    Location:
    Gironde, France
    #16
    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.
     
  17. Denarius macrumors 6502a

    Denarius

    Joined:
    Feb 5, 2008
    Location:
    Gironde, France
    #17
    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?
     
  18. RedDog002 thread starter macrumors newbie

    Joined:
    Feb 2, 2010
    #18
    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.
     
  19. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
  20. Denarius macrumors 6502a

    Denarius

    Joined:
    Feb 5, 2008
    Location:
    Gironde, France
    #20
    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.
     
  21. RedDog002 thread starter macrumors newbie

    Joined:
    Feb 2, 2010
    #21
    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 ? :)
     
  22. Denarius macrumors 6502a

    Denarius

    Joined:
    Feb 5, 2008
    Location:
    Gironde, France
    #22
    And what do you do if the photo is mentioned in more than one list?
     
  23. RedDog002 thread starter macrumors newbie

    Joined:
    Feb 2, 2010
    #23
    I'll take the latest list. I'll put it in that folder. ;)
     
  24. Denarius macrumors 6502a

    Denarius

    Joined:
    Feb 5, 2008
    Location:
    Gironde, France
    #24
    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. :)
     
  25. RedDog002 thread starter macrumors newbie

    Joined:
    Feb 2, 2010
    #25
    That's it!
    Thanks for the help.
     

Share This Page