Spotlight Querying

Discussion in 'Mac Programming' started by Eidorian, Oct 9, 2007.

  1. Eidorian macrumors Penryn

    Eidorian

    Joined:
    Mar 23, 2005
    Location:
    Indianapolis
    #1
    I want some more Spotlight power.

    I want to query a set of folders to see what files don't already have Spotlight comments.

    Automater and even Spotloght arguements suggestions would be helpful.

    I've tossed the idea around for a thumbnailing application that does this as well. I use Spotlight comments for my images.
     
  2. Accident macrumors newbie

    Joined:
    Oct 9, 2007
    #2
    List View + View Comments

    You could look at the folder of images in List view (cmd-2), then in View Options (cmd-J) you can add the column "Comments".

    Spotlight comments are shown here and files with no comments show -- in the Comments column.

    If the folder has a lot of files, you could click the Comments column header to sort the list by comments (files with no comments go at the top or bottom, your choice)
     
  3. Eidorian thread starter macrumors Penryn

    Eidorian

    Joined:
    Mar 23, 2005
    Location:
    Indianapolis
    #3
    I'm surprised I didn't figure that one out. I'd still prefer to query Spotlight and have some thumbnails to work with.

    It's a step in that direction though. Thanks!
     
  4. xUKHCx Administrator emeritus

    xUKHCx

    Joined:
    Jan 15, 2006
    Location:
    The Kop
    #4
    I have been looking into spotlight and it is rather annoying. The property "kMDItemFinderComment" does not exist until a comment is added. However you don't really need spotlight to achieve this. I came up with my own way to present the data by interpiting what you want to do with the results. May not be what you want, if that is the case then either edit it, trash it or tell me what you want changing. May not be the most efficient way of doing it but it seems to get the job done. I tested it on a folder of 1500 files and one my Core 2 duo iMac it took 54 seconds. I tried using spotlight to do the search, to speed things up, but couldn't work around the no existent value. Perhaps someone who actually knows about these things can answer, after all i am a rusty self taught scripter.

     
  5. Eidorian thread starter macrumors Penryn

    Eidorian

    Joined:
    Mar 23, 2005
    Location:
    Indianapolis
    #5
    I'll give this a try some time this week.

    It doesn't like playing around with NFS mounting home directories so I'll have to set up time in a local account.
     
  6. Eidorian thread starter macrumors Penryn

    Eidorian

    Joined:
    Mar 23, 2005
    Location:
    Indianapolis
    #6
    I tried it out in Leopard and it appears to be working just fine.

    Thanks!
     

Share This Page