Jump to content

Cd to directory

Recommended Posts

You could add something like:



    tell application "Finder"
        set input to the target of the front window as alias
    end tell
on error
    set input to (path to home folder)
end try
tell application "Terminal"
    do script "cd " & quoted form of POSIX path of input & ";clear"
end tell
in order to open the current folder in terminal.
Link to comment

Thanks for the input guys. I didn't make this to open the current finder directory in terminal. I made it to open a completely separate directory in terminal, by searching the file system.


@jhuiting: I like how you can do other commands that way, but for cd'ing I wanted to be able to search the file system to not have to memorize the path. Using ">" requires that you know the exact path the the folder. If I memorized the path to a folder, what do I need alfred for?  :)


@franzheidl: yeah I saw that, but I didn't like how you had to have the finder window open to cd to it. I really don't use finder ever.

Link to comment
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...