Batch copy file name action in Apple Script for Automator Mac OS X

1k Views Asked by At

Can one automate the process of copying a file name and pasting it in the Spotlight Comment box of that file? How does that Apple Script for OS X looks like?

I would need to do that a thousand times otherwise:

  1. Hitting enter to select the file
  2. Short cut typing Hotkey Cmd C
  3. Short cut typing Hotkey Cmd I to open that info window
  4. Hitting tab button twice to enter the Spotlight Comment box
  5. Short cut typing Hotkey Cmd v
  6. Short cut typing Hotkey Cmd w to close that info window

The aformentioned folder contains a thousand files and even more.

1

There are 1 best solutions below

5
Craig Smith On

Automator has that function built right in, via the Set Spotlight Comments for Finder Items Action:

enter image description here

You should be able to point the first action at your target folder, have it find all the files, and it will add the Comment to all of them.

Good luck,