Open Finder folder window from button

Hello, is it possible to open a Finder folder window from a UXP panel? I’ve been experimenting with something like:

const {shell} = require(“uxp”);
shell.openExternal("/Users");

but get an error in Finder (-50) and it doesn’t work. Doing the same in Windows works as expected, for example:

const {shell} = require(“uxp”);
shell.openExternal(“D:\Work”);

Anyone know how to replicate this in macOS? Very grateful for any help.

Ok silly me, I just needed to add the “file://” at the beginning! This works

const {shell} = require("uxp");
shell.openExternal("file:///Users");
2 Likes