update file metadata from the command line

yogaboy

Registered
Hi,

Does anyone know of any other way to update a file's Spotlight Comments other than using GetInfo? I'm trying to do this via perl or system commands, but it seems you can only examine the attributes and not update them.


Any help at all is much appreciated.

Thanks
Iain
 
AppleScript can do it, so combine a one-liner AppleScript with the "osascript" command and you get something like:

Code:
osascript -e 'tell application "Finder" to set comment \
of file "your_filename" to "foo/bar/baz"'
(Line broken for clarity, it should be entered as a single line)
 
Many thanks, I appreciate you putting in the time to help me. That gives me something to work with, it's a big help!
 
Back
Top