I am building a webpage that indexes files on my system (macOS). I would like to be able to add two hyperlinks to each file, one which a) opens the file, and one which b) reveals the file in the finder.
Regarding a), I can open a file with the following URL:
file://…
However, this displays it in the browser window, whereas I would prefer to open it in the default application. So not quite what is needed.
Regarding b), I have no idea if such a URL scheme exists, but would appreciate it if anyone knows how to achieve this.
I have been able to achieve it by passing the file path to Keyboard Maestro and then using a macro to open / reveal the file. However, I would prefer to achieve this without any intermediate application.