New Disk Browser for Window

Summary: Makes a new disk browser showing the current window’s parent folder.
Requires: BBEdit
Suggested Key Binding: Command-Control-B
Last Modified: 2019-10-02

Description

This script makes a new disk browser showing the current window’s parent folder. This is useful to quickly open nearby files. I prefer it to using Open File by Name because the graphical type-ahead lets me type only a few letters and still be sure which file will open.

Installation Instructions · Download in Compiled Format · Download in Text Format

Script

tell application "BBEdit"
    
set _file to file of text document 1
end tell
tell application "Finder"
    
set _parent to container of (_file as file)
    
set _parentAlias to _parent as alias
    
set _posixPath to _parentAlias's POSIX path
    
do shell script "bbedit " & _posixPath's quoted form
end tell