I have a bunch of files to rename from someone else that sit inside folders and subfolders, and would like to copy the path and file name to the Spotlight comment of each file before I do anything with them.
The script in answer to this question for adding the file name to the Spotlight comments works great, but I don't have the skills to modify it to include the path. I have tried replacing a few items with path or POSIX path in a meaningful way, but can't get it to work, nor do I find the commands elsewhere. Any help is appreciated.
Best Answer
Building upon jackjr300's answer, you can add the path to the comment with this modified script:
The changes to the original script are these two lines:
The first line sets
tPath
to a string containing the path toi
. In this casei
is the file being examined.The second line appends the path to the file's comment using the segment:
& " - " & tPath
. The section between the two double-quotes can be changed to something other than a hyphen.