ディレクトリを作成し、一連のファイルをそこに複製するという繰り返しの作業を行っています。私が探しているのは、そのプロセスを自動化するスクリプトです。これを Alfred ワークフローに入れ、必要なときに呼び出すだけです。
これまでのところ、最前面の Finder ウィンドウにディレクトリを作成するスクリプトを作成しましたが、そのディレクトリに 4 つの特定のファイルの複製を含める必要があります。
d="$(osascript -e 'tell app "Finder"
POSIX path of (insertion location as alias)
end')/new folder"
mkdir "$d"
cp /path/to/files/* "$d"
open -R "$d"
または AppleScript を使用して:
tell application "Finder"
set d to make new folder at (get insertion location) with properties {name:"new folder"}
duplicate files of (POSIX file "/path/to/files/" as alias) to d
reveal d
end tell