A few days ago I wrote myself a plugin to choose a file and have the path to the file returned as either posix, quoted posix or hfs path. Unfortunately it didn’t work at least it didn’t with the shell script macro I was writing, however it worked fine via Applescript. After beating my head against it for a couple of days I discovered the problem was the “Execute a Shell Script” action. It will not work (OMM) if there is a space or spaces in a path, doesn’t matter how it’s quoted or escaped, it fails. The solution was to use the “Execute an Applescript” action with its “do shell script” command.
You will need a folder on your desktop named “Text Files” and an empty text file inside it named “test file.txt” for testing purposes.
Here is a demo macro if you wish to test it out. Bug in execute shell script.kmmacros (4.7 KB)
and a look at the macro itself: