Dear Forum,
I am definitely not an AS evangelist, but I would like to be able to change/set by script a folder icon.
Here is what I have:
- there is the original folder with a custom icon placed on my NAS (APF connected)
- An alias of that folder is located on my desktop. After a restart of either my iMac (11.3.1) or my NAS (QNAP TS 4.5.3 Pro) the folder doesn’t show the custom icon anymore, but only the generic blue folder icon.
I can manually correct this by copy’n-paste or drag’n-drop but I wonder if there is aa way to do this by a script.
Here is what I thought might work but obviously doesn’t:
tell application “Finder”
activate
set originalFolder to “afp://myNAS(AFP)._afpovertcp._tcp.local/foldername” – path to original folder
set aliasFolder to “/Users/iMac/Desktop” – path to alias folder
set icon of aliasFolder to icon of originalFolder
end tell
What am I doing wrong? Is it possible at all?
Thanks for your time and help,
Ralf
Model: iMac 27" 2019, 11.3.1 (Big Sur)
AppleScript: 2.7 (Editor 2.11 (225)
Browser: Safari 14.1 (16611.1.21.161.6)
Operating System: macOS 10.14