From within a shell script (or, similarly, within a terminal) I want to reveal multiple files in Finder with all named files already selected.
Surprisingly, using open -R
with multiple arguments fails to achieve this when files share a folder. For example, if I have two files, /tmp/foo/file1
and /tmp/foo/file2
, then open -R /tmp/foo/file1 /tmp/foo/file2
causes a Finder window to open showing /tmp/foo
but with only file2
selected, rather than both selected.
Is revealing multiple files within a single folder, with multiple files preselected, programmatically achievable?