I am trying to put a color mark in a file using AppleScript using the following code:
set theFile to "HDD:Path:to:the:file.ext"
tell application "Finder"
set label of file theFile to 3
end tell
but when I run it in terminal with osascript theScript.scpt, I get the following error:
theScript.scpt: 144: 178: runtime error: Finder received an error: cannot set the file label of the document "file.ext" in the folder "folder" to the "Path" folder of the boot disk to 3. (-10006)
Any ideas why I am having a problem and how can I get it to work?
source
share