Quantcast
Viewing all articles
Browse latest Browse all 2

Use highlighted file in Finder as Bash variable (Applescript, macOS 10.13)

I want to set up an applet for archiving my files in non-standard formats (e.g. non .zip/.cpgz/.tar) with only the use of Applescript and the command line versions of each format's respective tool. The last thing I need to figure out is how to get the path of the currently highlighted file in Finder via Applescript, so that I can pipe it to bash.

I've searched around a bit and can't seem to find an answer to this via search engine, or this forum. I have found and still find that Apple's documentation has about a 40/60 chance of being too sparse and/or outdated, or even simply nonexistent for any given subject, so I opt not to use it when possible. Please don't just link to an Apple documentation page, Real-world examples are always appreciated.

The target platform is macOS 10.13.2, Automator 2.8, Applescript 2.7.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>