Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I find myself doing this too often - navigate to a folder, "Open Terminal Here", then "mate .", then "python -m SimpleHTTPServer"

I was wondering if it's possible to add a button to the finder toolbar that when I click it runs those two commands for me for the folder that I'm currently in?


share|improve this question
up vote 3 down vote accepted

The following AppleScript should work, which you can save as an application and put in your Finder toolbar.

tell application "Finder"
        set folderPath to (quoted form of POSIX path of (target of front window as alias))
        tell application "Terminal"
            do script "cd " & folderPath & "; mate .; python -m SimpleHTTPServer"
        end tell
    end try
end tell
share|improve this answer
worked like magic :P thanks! – Nikolay Dyankov Feb 13 '12 at 4:22

There are several apps like TextExpander that can do the text input for you. Another option might be to add a text substitution into the Language & Text System Pref under the Text pane.

There's a free Automator action, Open Terminal Here that seems like it should accomplish the first part.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.