set tsvFile to (choose file)
tsvFile as string -- HFS
POSIX path of (tsvFile as string) -- POSIX
tell application "System Events"
container of tsvFile -- enclosing folder
end tell
You can actually coerce the result of the choose file command in one line. You could also coerce it to a file specification with as «class furl», or to a posix path as seen further down.
set tsvFile to (choose file) as text
I wouldn’t recommend this method unless you plan on using the result with a shell script but you can also use dirname:
do shell script "dirname " & quoted form of POSIX path of (choose file)