osx - Using "~" with a POSIX path in AppleScript -
how can use ~
in following applescript?
info posix path of "users/[user]/pictures"
the script should universal, if replace users/[user]
~
, script looks that
info posix path of "~/pictures"
i'm getting error directory not available.
i'm thankful help.
there no need use tilde (~
) in applescript, shortcut current user's home folder in shell.
there many relative paths in applescript
path desktop
is alias specifier desktop folder of current user, equivalent
alias "[startup volume]:users:[current user]:desktop"
the relative path pictures folder is
path pictures folder
other paths
path music folder path applications folder path home folder
etc.
please dictionary of standard additions further paths
for relative paths there parameter specify domain
path library folder user domain -- alias "[startup volume]:users:[current user]:libary" path library folder local domain -- alias "[startup volume]:library" path library folder system domain -- alias "[startup volume]:system:library"
info for
old part of standard additions. it's deprecated since leopard it's still working. simplest form pass alias specifier:
info (path pictures folder )
Comments
Post a Comment