File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Mac OS and the fly likes Add Spotlight Comments to a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "Add Spotlight Comments to a file" Watch "Add Spotlight Comments to a file" New topic
Author

Add Spotlight Comments to a file

Bd Howard
Greenhorn
Ranch Hand

Joined: Mar 30, 2012
Posts: 80
Hi,

Does anyone know if it is possible to add Spotlight Comments to a file via Java? I know this is easy with AppleScript, but what about Java? Can Java call an AppleScript?

I've written a little batch file-renamer and I'd like to add Spotlight Comments to those renamed files.

Thank you,

BD


I've got just enough Java knowledge to royally screw everything up. :-)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41599
    
  55
Not directly, but two possible approaches are mentioned here: http://stackoverflow.com/questions/821969/query-mac-os-x-spotlight-from-java. This might also be of interest: http://code.google.com/p/understand/wiki/MacOSMetadata


Ping & DNS - my free Android networking tools app
Bd Howard
Greenhorn
Ranch Hand

Joined: Mar 30, 2012
Posts: 80
Thank you for those links. I was hoping for a more direct approach, but like the song says, "you can't always get what you want".

Appreciate your help,
BD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Add Spotlight Comments to a file