Combining Finder’s File Open/save dialog with Alfred

alfredapplescriptdialogfinder

Finder's Open/Save File dialog is actually very dumb (in terms of flexibility). When I look for a file or its location, I can probably find it much faster using Alfred.

However, in many cases, you just have to use that dialog. Not particularly when you open files, but for example when you specify the place to save them.

As I'm a keyboard-only user (at least for 99% of the time), I find it tedious to launch Alfred, and reveal the file/directory in Finder and drag it (or its proxy icon) to the dialog in order to open/save it.

Is there any way I can get a keyboard-only, fuzzy-matching style file/folder selection mechanism for this dialog?

I could imagine using Alfred and AppleScript for that, but I don't know where to start. The end result would be that I could just select the appropriate file or folder via Alfred.

Note that:

  • I have the Alfred Powerpack, so AppleScript is possible.
  • I know Alfred has an "Open with…" action. This is not the same.
  • I know I can go to folders with G, but it's weak in comparison to what a real shell offers.
  • I know you can Spotlight-search in that dialog, but I prefer Alfred's capabilities.

Update, 5 years later: I came looking for a solution for this and stumbled upon my own question. I also found this thread in which people have suggested several workflows, but the only one that would actually directly work is now a dead link (don't you just love it when text-only stuff is hosted on someone's Dropbox?).

Best Answer

Once you find the file using Alfred, you can copy its path to the clipboard and paste that path into the Go to Folder tool of open/save dialogs.

Find your file in Alfred, press the right arrow key to view the list of operations for that file, the up arrow key to go to the last option (Copy path to clipboard), and then the enter key to activate that option.
Switch back to the open/save dialog, press cmd-shift-g to open the Go to Folder dialog, paste the path in, and hit enter. The file will be selected and you can hit Enter to open/save.


If you're interested in getting some more flexibility out of Open/Save dialogs, I highly recommend Default Folder X. It's immensely powerful and customizable and could eliminate the need for workarounds like this.
$35, 30 day trial