Automator, spotlight comments and an excel database


Joined
Mar 20, 2012
Messages
1
Reaction score
0
Anyone know how to achieve the following:

-I have many, many files, each with a unique name.
-I have an excel spreadsheet with all filenames listed in column A, and a description of each file in column B.
-I want to automate a process where the description of a given file is copied into the spotlight comments box for that file.

I've been trying to create a workflow in automator to achieve this, but haven't been able to pull it off.

Anyone have any ideas?

Thanks.
 
Ad

Advertisements

Joined
Nov 26, 2010
Messages
3,558
Reaction score
49
Not something that Automator will do.
Try AppleScript.
 
Ad

Advertisements

Joined
Mar 20, 2012
Messages
1
Reaction score
0
Is Visual Basic for Applications (VBA) available in the version of Excel that you?

If so, then you might want to write some VBA to iterate through your spreadsheet to generate a shell script to apply the associated comment to each file. That is, use VBA to produce a file containing lines like…

xattr -w com.apple.metadata:kMDItemFinderComment "coment" filename

where comment and filename are the values from column B and A of your spreadsheet respectively.

Then in a Terminal window use chmod+x on the generated file before executing it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top