Open a particular folder or file

In applications that have the standard file open dialog (i.e. the Finder-like window) I'd like to open specific folders or files. The trouble is that I don't see anywhere I can have KM type a local file path into the Finder window. Is there a way to do this?

When the file open dialog appears, trigger a KM macro that:

  1. Type a Keystroke action using ⌘⇧G
    • this will open the standard GoTo field
  2. Insert Text by Pasting action the full POSIX path of the folder or file you want
  3. Type a Keystroke Action using RETURN

Questions?

Use Action “Open File Folder or Application” (in File groups)

Or use shell script:

# open /Path/of/Folder/

# example
open /Users/$(whoami)/Documents/

Hi JMichaelTX,

I made a mistaken assumption. Because the application I'm using (SourceTree) doesn't appear in the Finder's "Open With" list, and because it can be used to open folders and the Finder doesn't have an Open With in the context (right-click) menu for folders, I assumed I would have to do some trickery to open things from the Open menu of SourceTree.

Turns out that suliveevil's solution works -- KM can open a folder with SourceTree.

I have one other question. I'd like to trigger KM's "Open File/Folder/Application" when I have the Finder open -- on the folder displayed in the finder at that moment. I can't find a variable or function that reads this folder (call it the "current folder", say).