My question is how can I step through a smart folder created by Spotlight? “Smart folder” isn’t turning up anything useful on the search page.
I’ve got a new pristine MacBook and and an older PowerBook with several thousand .jpgs that I’ve been negligent in organizing through the years, scattered all over, many with identical names, some of which actually are the same images and some are not.
I’ve created a smart folder of these .jpgs with Spotlight and want to write a script to cycle through them all to collect all unique folder paths so I can individually move those folders to the MacBook and sort out dupes later. Or maybe just move the files individually. But in any event I have to step through the smart folder.
It would be interesting to see if there is a way to return the “contents” of it, but I’m thinking that might not be directly possible; a Smart Folder is just a saved search - no real files or folders. One alternative is to walk target folders, filtering for the kind property.
But I see the smart folder “file” itself is an XML file containing some cryptic info that maybe some App Kit Objective-C calls could make use of - I’ll play around.
I didn’t look closely and just assumed it was cryptic. I wrote a perl script this morning to search and move 5000+ jpegs this morning to do it. AppleScript would have been quicker though.