Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to automatically open a Terminal window to its directory' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to automatically open a Terminal window to its directory
Authored by: Lri on Jul 06, '11 02:25:32AM
tell application "Finder" to set il to insertion location as alias
set cmd to "cd " & quoted form of POSIX path of il
tell application "Terminal"
	activate
	try
		do script with command cmd in window 1
	on error
		do script with command cmd
	end try
end tell
  • Doesn't always open a new window
  • Makes the Terminal window frontmost
  • Uses insertion location, so it works on for example Desktop


[ Reply to This | # ]