Useful for an automator action for example:

-- Open terminal at given path
--
-- From: www.chipwreck.de

set p to POSIX path of (item 1 of i as alias) -- define i
   
tell application "Terminal"

   activate
   do script "cd \"" & p & "\""
   close window 2
   
end tell