Managing files and folders in the disk browser window from the BBEdit's Script menu.
Wouldn't it be nice to be able to manage files and folders from the BBEdit's disk browser window? Now you can by installing the BBEdit Disk Browser Suite in the Script menu of BBEdit, and the BBEditLib's library in your home Library folder. Once you've done that, you will be able to access from the BBEdit's Script menu up to 10 commands to be executed on selected file(s) or folder(s) in a disk browser. The BBEdit Disk Browser Suite and BBEditLib are written in AppleScript.
The commands are:
Download the suite and decompress the sit archive, then put the folder
Disk Browser in the folder
Script in the folder
BBEdit Support in the BBEdit application's folder. Secondly, put the BBEditLib's file in your home Library (~/Library/BBEditLib). As extra, you can put the script
Open in BBEdit's Browser in your home Script folder (~/Library/Script/). This will add a new command to the Apple Script menu in the main menu bar of OS X (if, of course, you have installed the Apple Script Menu).
Move to trash the selected file or folder. If the Finder can't move the file to the trash, the command use the unix shell with the command
"rm -rf"that could remove directories is not used because its too dangerous). Only one selection is allowed.
Duplicate the selected file or folder. Multiple selections are allowed.
Select a file or a folder and ask for a new name for the front most disk browser window. Only one selection is allowed.
Name browser to Parent folder
Name without asking the front most disk browser window to the parent folder of the selected file or folder. Only one selection is allowed.
If a file is selected, create a new BBEdit text file in the same folder. If a folder is selected, create a new BBEdit text file in the selected folder. Ask in both cases for the name of the new file. Only one selection is allowed.
New File & OpenIdem as New File but open the file in BBEdit after its created.
If a file is selected, create a new folder in the same folder of the file. If a folder is selected, create a new folder in the selected folder. Ask in both cases for the name of the new folder. Only one selection is allowed.
Rename a file or a folder. Only one selection is allowed.
Reveal the selected file or folder in the Finder. Only one selection is allowed.
Show Document in Browser
If a document window (and not a disk browser window) is the front mots window, open the folder containing the file in a new disk browser window and name the new disk browser window to the name of the enclosing folder.
Note: Unfortunatly, its not possible to select the targeted document window in the disk browser window because the
disk windowclass of the BBEdit's AppleScript dictionary doesn't support such a method.
Version 1.0.3 - February 4 2003
Fixed a small bug in the deleteFile method of the diskBrowserWindow class of BBEditLib.
First release: Version 1.0.2 - February 3 2003
Tested on OS X 10.2.3 with BBEdit 7.0.1.