Tinderbox Forum

Stamp I'd like: "Reveal this document in Finder"

In several of my Tinderbox documents I have stamps which open a specific folder in the Finder. Something like:

runCommand("open " + $Text(/Config/TargetFolder));

I would like to have a more generic stamp that simply reveals the current Tinderbox document in Finder. Is there a way to do that? I tried using pwd as part of the command, but that’s always set to my Home directory.

Isn’t it just as easy to use the dock icon menu Options ▸ Show In Finder ?

But the expression document[path] returns the path to the document, and document[url] returns the file URL of the document.

Yes one more way (that’s not what you’re asking for! :smiley:) is to right-click on the window title and to click on the containing directory. The upside of this method is that it works pretty much everywhere else in macOS.

Doesn’t that reveal the application rather than the document? Seems to for me.

I didn’t know about document[path], thanks.

That’s cheating! :smile: Yes, that works. I was just tinkering with a document that has several other finder-related stamps so wanted to see if I could do it.

This works, FWIW:

runCommand("open -R '" + document[path] + "'")

I didn’t know about the -R flag (“Reveal”) of the open command, so I learned two new things today :slight_smile: .