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


Click here to return to the 'Add a 'Go to Parent Folder' button to the toolbar' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add a 'Go to Parent Folder' button to the toolbar
Authored by: eti on Mar 27, '07 11:29:35AM
Nice tip! It got me thinking, and that's a good thing :)

By the way, this avoids the error when you get to the top of the hierarchy:

tell application "Finder" to set p to target of window 1 as string

set x to POSIX path of file p
set z to do shell script "cd " & x & "; cd .. ; pwd"

tell application "Finder" to set target of window 1 to POSIX file z
There's probably better ways to do the Applescript and shell side of it, but that's what I came up with.

[ Reply to This | # ]
Made a "Open Terminal here" button
Authored by: eti on Mar 27, '07 01:03:46PM
Using the principles put forth in this tip, I made a folder toolbar button that opens a terminal widow and sets it's path to the folder you were at.
tell application "Finder" to set p to target of window 1 as string

set x to POSIX path of file p

tell application "Terminal"
	activate
	do script "cd " & x
end tell


[ Reply to This | # ]