macOSの場合は過去の経緯によりAppleScriptを利用するのが一番妥当かつ安全ではないかと思われます。AppleScriptは一般的なプログラミング言語(C言語などアルゴル系言語)とは異なり独特の文法を持っています。wikiで調べてみると、もう30年も前に発表されたと ...
In the last AppleScript post, I mentioned some of the useful ways to create Folder Actions, and showed you how to use one of the built-in scripts to perform a pretty useful action. In this AppleScript ...