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

Eidorian

macrumors Penryn
Original poster
Mar 23, 2005
29,190
386
Indianapolis
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.
 

Accident

macrumors newbie
Oct 9, 2007
18
0
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)
 

Eidorian

macrumors Penryn
Original poster
Mar 23, 2005
29,190
386
Indianapolis
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!
 

xUKHCx

Administrator emeritus
Jan 15, 2006
12,583
9
The Kop
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.

tell application "Finder"
set nocommentslist to {}
set searhfolder to (choose folder)
set i to entire contents of searhfolder
repeat with each_item in i
set commentsstate to get comment of each_item
if commentsstate is equal to "" then
copy each_item as alias to end of nocommentslist
end if
end repeat
end tell

if nocommentslist is equal to "" as list then
tell me to activate
display dialog "No Pictures"
else
repeat with each_item in nocommentslist
tell application "Finder"
set finderwindowopened to folder of (reveal each_item as alias)
tell application "Finder" to set IsFolder to (kind of each_item = "Folder")
if IsFolder is true then
set infowindowopened to (open information window of folder each_item)
else
set infowindowopened to (open information window of file each_item)
end if
end tell
tell me to activate
set quitbutton to button returned of (display dialog "next picture")
try
close finderwindowopened
close infowindowopened
end try
if quitbutton is equal to "Canel" then
return
end if
end repeat
end if
 

Eidorian

macrumors Penryn
Original poster
Mar 23, 2005
29,190
386
Indianapolis
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.