I'm pretty new to Applescript and am trying to reference a file on the currently logged-on user's desktop, but I don't know how. In POSIX you'd use the tilde character to specify the user's home folder, but that doesn't seem to work in applescript. I've read other posts about how "desktop" is already defined as a keyword applescript understands, but I don't know how to specify a sub-folder of the pre-defined keyword (desktop/folder doesn't work).
Any help would be appreciated.
set theTargetFolder to ((path to Desktop Folder) & "name of target folder") as string
returns "Macintosh HD:Users:username:Desktop:name of target folder"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With