Finder Push and Pop

This might make the bash people out there smile a little bit. If you love the push and pop functions on unix, this pair of macros bring both to the OS X Finder.

The core of each macro is an AppleScript, so these could easily be ported to LaunchBar or Alfred.

Macro 1 - Push

The Push macro grabs the currently viewed folder path and saves it to a Keyboard Maestro macro.

Push Macro

tell application "Finder" try set myWindow to folder of front window as string return myWindow end try end tell


Macro 2 - Pop

This macro reads the variable saved from the Push macro and then executes an AppleScript to open the Finder location

Pop  Macro


tell application "Keyboard Maestro Engine" set kmVarPush to (process tokens "%Variable%pushPath%") end tell tell application "Finder" try open kmVarPush end try end tell


These macros live on my Finder palette in Keyboard Maestro.

Finder Palette

If I’m working in a Finder window that I may need to recall later, I hit ctrl-cmd-F to bring up my Finder palette for Keyboard Maestro. I then hit the 8 key for the “Push” macro.

Later, when my Finder windows are all out of order or closed completely, I hit ctrl-cmd-F and then the 9 key for the “Pop” macro. A shiny new Finder window is opened right to where I wanted it.