How can the properties of a file be accessed and changed? Specifically, I want to change the names of a set of files based on fields in an image database. Here is what I have tried in my handler, which I can’t make work:
tell application “Finder”
set theFile to a reference to “Macintosh HD/Users/me/Images/ART/Monika/PSD/CRW_6975.psd”
set theItem to properties of theFile
set theFname to name of theItem
set name of the theItem to newName
length of theItem
end tell
I have tried colons in the path and instead of “a reference to” before I have appended an “as reference” at the end. None of the lines above work. I thought scripting Finder items and files involved changing fields in their property records but I can’t seem to access them. Thanks for any insights.