I'm confused - I've been googling for an hour and have tried probably ten different forms of set posixDirectory to POSIX path of (parent of (path to aFile) as string)
but I can't seem to get it right.
I'm getting the full POSIX path (including the filename) by doing
set posixFilePath to POSIX path of aFile
Now, how do I get the POSIX path of just the directory?? I'm getting various errors depending on what I do... can't make alias.. can't get parent of alias...
I would think this should work but it's not...
set posixDirectory to POSIX path of ((parent of aFile))
There are couple of ways to do this if you already have the initial path.
From Posix path format
or using shell
Result:
"/Users/USERNAME/Documents/Test"
From Posix file format
Result:
"Macintosh HD:Users:USERNAME:Documents:Test"