Skip to main content
refined answer
Source Link
matthewpavkov
  • 414
  • 1
  • 4
  • 12

Ok...this was easier than I had realized. After some Googling, it looks like what I need here is the POSIX path of command. This converts a given path to a Unix style path, which is the type of path you would see/use in Terminal. So:

POSIX path of input

Gives me a path like:

/Users/Matthew/Documents/Programming/Apple Scripts/

It seems to take into account that you just need a / at the beginning of the path, rather than the hard drive name. It does not, however, escape \ spaces (or handle special characters) in the path. So, as the other answer here mentions, you need to place the path in quotes ( " or ' ) in order for those spaces (or special characters) to be interpreted literally. You accomplish this by using quoted form of. Here it is:

quoted form of the POSIX path of the input
-- gives a path like: '/Users/Matthew/Documents/Programming/Apple Scripts/'

Ok...this was easier than I had realized. After some Googling, it looks like what I need here is the POSIX path of command. This converts a given path to a Unix style path, which is the type of path you would see/use in Terminal. So:

POSIX path of input

Gives me a path like:

/Users/Matthew/Documents/Programming/Apple Scripts/

It seems to take into account that you just need a / at the beginning of the path, rather than the hard drive name. It does not, however, escape \ spaces in the path. So, as the other answer here mentions, you need to place the path in quotes ( " ) in order for those spaces to be interpreted literally.

Ok...this was easier than I had realized. After some Googling, it looks like what I need here is the POSIX path of command. This converts a given path to a Unix style path, which is the type of path you would see/use in Terminal. So:

POSIX path of input

Gives me a path like:

/Users/Matthew/Documents/Programming/Apple Scripts/

It seems to take into account that you just need a / at the beginning of the path, rather than the hard drive name. It does not, however, escape \ spaces (or handle special characters) in the path. So, as the other answer here mentions, you need to place the path in quotes ( " or ' ) in order for those spaces (or special characters) to be interpreted literally. You accomplish this by using quoted form of. Here it is:

quoted form of the POSIX path of the input
-- gives a path like: '/Users/Matthew/Documents/Programming/Apple Scripts/'
refined answer
Source Link
matthewpavkov
  • 414
  • 1
  • 4
  • 12

Ok...this was easier than I had realized. After some Googling, it looks like what I need here is the POSIX path of command. This converts a given path to a Unix style path, which is the type of path you would see/use in Terminal. So:

POSIX path of input

Gives me a path like:

/Users/Matthew/Documents/Programming/Apple\Apple Scripts/

It seems to take into account that you just need a / at the beginning of the path, rather than the hard drive name. It does not, however, escape \ spaces in the path. So, as the other answer here mentions, you need to place the path in quotes ( " ) in order for those spaces to be interpreted literally.

Ok...this was easier than I had realized. After some Googling, it looks like what I need here is the POSIX path of command. This converts a given path to a Unix style path, which is the type of path you would see/use in Terminal. So:

POSIX path of input

Gives me a path like:

/Users/Matthew/Documents/Programming/Apple\ Scripts/

It seems to take into account that you just need a / at the beginning of the path, rather than the hard drive name.

Ok...this was easier than I had realized. After some Googling, it looks like what I need here is the POSIX path of command. This converts a given path to a Unix style path, which is the type of path you would see/use in Terminal. So:

POSIX path of input

Gives me a path like:

/Users/Matthew/Documents/Programming/Apple Scripts/

It seems to take into account that you just need a / at the beginning of the path, rather than the hard drive name. It does not, however, escape \ spaces in the path. So, as the other answer here mentions, you need to place the path in quotes ( " ) in order for those spaces to be interpreted literally.

Source Link
matthewpavkov
  • 414
  • 1
  • 4
  • 12

Ok...this was easier than I had realized. After some Googling, it looks like what I need here is the POSIX path of command. This converts a given path to a Unix style path, which is the type of path you would see/use in Terminal. So:

POSIX path of input

Gives me a path like:

/Users/Matthew/Documents/Programming/Apple\ Scripts/

It seems to take into account that you just need a / at the beginning of the path, rather than the hard drive name.