Useful Mac Script

PostsUseful Mac Script

When I used to use Windows more regularly (i.e. Windows NT), one of the most useful commands was the “start” command.  It would behave much like the “Run” dialog.  The number one thing I used it for was to open the current directory (or another directory) in the Explorer.

When I moved to Linux, this was still relatively possible (using konqueror or gmc from the terminal).
Upon moving to the Mac, I’ve never found anything that does it very well.  I googled around for something today, and still found nothing.  So I thought a little bit and wrote one.
You can download it here.  I called it “reveal”.  It does some very simple (by no means comprehensive) URL escaping on the specified path (or current directory if none is given) to create a file URL.  Then it uses osascript to tell Finder to open that location.  Simple.
UPDATE: I added a line to bring Finder into the foreground.
UPDATE++: Apparently there’s already a command to do this (open).  Appeared in NextStep.  Curse you Google!
By Jayson Vantuyl on July 13, 20081 commentPosts

About Jayson Vantuyl

I live in San Francisco, California; have an awesome son, David; and make machines do (subjectively) interesting things. I'm generally an all around handy fellow.

1 comment

  • Reply Brian Minton said: September 8, 2008 11:11 am

    open is also a linux command, however what it does is quite different. It opens a new virtual console

Leave a Comment

Your email address will not be published. Required fields are marked *