views:

41

answers:

1

Hello,

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.

A: 
set theTargetFolder to ((path to Desktop Folder) & "name of target folder") as string

returns "Macintosh HD:Users:username:Desktop:name of target folder"

Philip Regan
Thanks. That did it!
EightQuarterBit

related questions