How to add badge to file or folder with AppleScript? I found some approach at https://discussions.apple.com/thread/1881786?start=0&tstart=0 but I don't think it is actual
You can use my helper program SetFileIcon here, and at the bottom of the web page is an example applescript showing how to use it.