The automator action listed in this thread works fine with one caveat - since it is touching each image file each run - it causes Time Machine to think each file has been modified and needs to be backed up. So for me I was seeing HUGE Time Machine backups and when I investigated it was because Time Machine was backing up the whole sub folder each run instead of just the newest additions. You can check your own Time Machine backups to see if this is the case on your machine(s) using the free Time Tracker app (Instructions here: http://pondini.org/TM/A2.html)
I re-engineered the original Automator workflow to only add the spotlight comment to new files that appear in the sub folder and that do not already have a spotlight comments. This way - the only files being touched are actually new additions to the sub folder. The new component of the workflow is a shell script that finds only the files without comments and adds the "PhotoStream" comment to those files. You can change the text that is added to the comment in line 5 of the shell script if you desire. Just change "PhotoStream" to whatever you want your comment to be. It probably runs a bit faster as well since it is a bash shell script instead of automator actions.
Following jesstech original post - the instructions are the same but the workflow is changed:
Start Automator and create a new Folder Action. In the "Folder Action receives files and folders added to" section, choose the sub folder at ~/Library/Application Support/iLifeAssetManagement/assets/sub. In the "Actions" column on the left, choose the "Files & Folders" category and drag the following two actions to the workflow, in this order:
Get Specified Finder Items
Run Shell Script
In the settings for the first action "Get Specified Finder Items", add the very same sub folder you chose earlier. If you would like to include images from "shared" Photo Streams, add the sub-shared folder inside /iLifeAssetManagement/assets as well.
For the second action, "Run Shell script", change the "Shell" dropdown menu in the upper left to "/bin/bash" and change the "Pass Input" dropdown menu to "as arguments". Then enter the following shell script into the action space below:
files="$(find -L "$@" -type f \( -iname "*.png" -or -iname "*.jpg" -or -iname "*.gif" -or -iname "*.tif" \))"
echo "$files" | while read file; do
comment=`/usr/bin/mdls -nullMarker "" -raw -n kMDItemFinderComment "$file"`
if ["$comment" = ""]; then
xattr -w com.apple.metadata:kMDItemFinderComment "PhotoStream" "$file"
fi
done
The final workflow should l look like this: