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

View, search and print folder contents with BBEdit Apps
This morning, while experimenting with a previous hint regarding BBEdit's Disk Browser mode, I stumbled across a very cool BBEdit feature. The following works in both BBEdit and the freeware BBEdit Lite, at least as of the 6.x versions (I haven't had time to upgrade yet!).

Open a new, blank document window. Now drag a folder from your hard drive into the new empty window. After a bit of processing time, BBEdit will display a hierarchical (sub-levels are indented) list of every file and folder within the folder! You can do this for application bundles to see what they contain, or (and this is pretty amazing) you can even drop a hard drive icon into the document! If you do, be prepared to wait a few minutes (depending on the size of the drive), but you'll be rewarded with a list of every file in every folder on the drive.

This seems like the easiest way I've yet to discover to get a complete printed folder hierarchy in a relatively easy to read format.
    •    
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[7,425 views]  

View, search and print folder contents with BBEdit | 9 comments | Create New Account
Click here to return to the 'View, search and print folder contents with BBEdit' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Nice, But ...
Authored by: Anonymous on Dec 04, '02 12:17:13PM

Agreed, this is a nice feature. However, the fact that it always goes recursively into Mac OS X packages is a minus, IMHO. It'd be nice if you dropped an app on it if it generated a recursive listing of the package contents, but otherwise did not ... as a result, even simply dropping your Applications folder on there will generate a huge list as BBEdit Lite delves into every package.

A nice alternative ... you can select all applications in your Applications folder and select 'copy,' then go into a BBEdit document and hit 'paste.' You'll get simply the application names.



[ Reply to This | # ]
iPhoto directories
Authored by: freebrian on Dec 04, '02 12:28:08PM

I just tried this with my iPhoto directory. I have about 350 pictures and iPhoto uses 2100 folders and files. How amazingly inefficient! No wonder it's so slow, look at all the filemgt it has to constantly be maintaining.



[ Reply to This | # ]
Access this through the pop-up menus
Authored by: jolinwarren on Dec 04, '02 01:55:50PM

I agree that this a useful feature. Just to note, though, this can also be accessed through the pop-up menus in the 'status bar' at the top of each window (presuming you have it displayed). Clicking on the square with the 'i-beam' cursor on it pops up the 'Insert Menu'. From here you can insert into your document "File Contents", "File Path", "Folder Listing", or "Folder Path". The "Folder Listing" item does exactly the same thing as this hint, but you can choose the folder through the standard open dialogue box -- if you want to insert the listing of your hard drive, just select it. The "...Path" options of this menu can be useful too.

Note that as of BBEdit [Lite] 6.1.x, you can specify which items are available in the status bar (Go to "Preferences", then "Status Bar" on the left) so if you've turned off the "Insert Menu" you'll have to turn it on again to use this!



[ Reply to This | # ]
Use the terminal Luke
Authored by: quattro on Dec 04, '02 06:05:01PM

You can do the same thing from the terminal using the \'find\' command. For example,

% find /Users/quattro > foobar

It took about 20 seconds to generate a list of all 114000 files in my home directory.



[ Reply to This | # ]
In Terminal...
Authored by: dump on Dec 04, '02 06:06:29PM

of course this is similar to ls -R. You don't get indentation but you do get the full path displayed before each directory's listing.



[ Reply to This | # ]
Removable media
Authored by: oeholmen on Dec 05, '02 03:54:13AM

Could this be used as a simple way to index removable media, CD-R's, zip etc?



[ Reply to This | # ]
Sure would be better if...
Authored by: jimhoyt on Dec 05, '02 04:53:25PM

BBEdit handled long filenames.

Jim



[ Reply to This | # ]
BBEdit 7.0
Authored by: bluehz on Dec 06, '02 09:21:52AM

Anyone else here notice that BBEdit 7.0 is very slow - especially when invoking dialogs. I recently downgraded back to 6.5.2 and regained the usual snappines I am accustomed to in BBEdit. Don't know what the problem is - but BBEdit 7.x is unusable for me.



[ Reply to This | # ]
Pipe that grep
Authored by: bq on Dec 16, '02 03:01:19PM

You can also identify specific files, kinds of files, or files with specific content and then pipe data into BBEdit. For example, in tcsh:

ls -lF | bbedit

...will produce a detailed listing of directory contents in BBEdit. More interesting is to use grep to filter the results.

ls -lF | egrep '\\.gif|\\.jpg|\\.jpeg' | bbedit

...will show only files that contain those extentions.

To see only files while excluding directories from the list, do...

ls -F | grep -v '/' | bbedit

You can also list all files in the current folder or lower which contain a specific content. This one's handy: it can hit data in text files, but also Word, Excel, Powerpoint, even Illustrator files. For example, to list all files which contain the phrase "My god, it's full of stars," do

grep -rl "My god, it's full of stars" ./ | bbedit

For the brave of heart, if you want a list of all the "pages" contained in your local web server, you could do...

ls -R /Library/WebServer/Documents/ | egrep '\\./|\\.htm|\\.shtml|\\.php' | bbedit


bq



[ Reply to This | # ]