Mike's miscellaneous utilities

This directory contains a bunch of utilities which I commonly use. Most of these were written by me; a few come from other sources.

This ain't rocket science -- don't expect any amazing programs here.  Nothing too fancy.

Many are command-line utilities. Many of these programs will list a few command-line options if you specify "-?".

USE THESE PROGRAMS AT YOUR OWN RISK.

Most useful programs

Program Mac? Windows? Description
RevealInOS    

Eclipse plug-in that adds a context menu item to all projects, folders, and files that says "Reveal in OS". This will show the item in Finder (on OS X) or Windows Explorer (on Windows).

To install, download the zip file and move it into your Eclipse's plugins directory.

bq     "Backquote" -- emulates the `command` capabilities of Unix shells.  For example:

bq echo `dir /b /s *.txt`

...will execute the "dir" command shown, and turn that command's output into the arguments for the "echo" command, so this might be equivalent to:

echo c:\foo.txt c:\foo\bar\bar.txt

env.bat     Batch file to allow fairly easy Notepad editing of environment variables for the currently active DOS prompt. Just type "env", then edit the environment variables and exit Notepad.
err     Translates Win32 error numbers into a string. Example: typing err 32 or err 0x20 displays:

   Error string for error 32 (0x20) is:

   The process cannot access the file because
   it is being used by another process.

filec     Filename completion program: You type the first few characters of a filename and hit Tab, and this program will fill in the rest of the name. Note: This program is for Windows 98 and Windows ME; it does not work on Windows 2000 and Windows XP. But that's okay, because similar functionality is built into those operating systems; click here to learn how to access it.
hb     A simple "HTML beautifier."   Given an HTML file as input, the program outputs the same file but with line breaks after commonly nested tags, and indenting to indicate the level of nesting.  Usage: hb <infile.htm >outfile.htm
strings     Displays all text strings which are found in a file. Very useful for figuring out what a binary file actually is. -U option (must be capital "U") means also show Unicode strings, such as resources and version info. I use this program all the time. Written by Microsoft.
wi     "wi programname" shows you ALL instances of that program on the path, in the order in which Windows would search for them. Searches not just the path, but the full list of places that Windows would search, including the current directory, the Windows directory, the System directory, and the path. Useful not just for finding a program, but also for figuring out which instance of a program is going to be run.

Other silly little programs

Program Mac? Windows? Description
crlf     Modifies a text file to have carriage return-line feed pairs at the end of all lines. Useful after bringing files over from a UNIX system. Note that this modifies a file IN PLACE: use "crlf filename".
detab     Converts tabs to the appropriate number of spaces. Defaults to 8 spaces per tab; use detab -4 to specify 4 spaces per tab.  Usage:

detab <infile.txt >outfile.txt

modify     Rename a bunch of filenames all at once, changing any arbitrary text fragment within those filenames. Example:

modify "DSC" "Photo "

This will change all files in the current directory whose names contain the string "DSC" to instead contain "Photo ".

scr     Command-line screen capture: captures all text which is on the current DOS screen into a file (filename "scr" by default). Handy for quickly saving things such as error messages.
show     Like "type", except that it makes "invisible" characters visible: Spaces are displayed as a dot, tabs as a right arrow, and control characters as ^A, ^B, etc. Also, if a carriage return isn't matched up with a linefeed or vice versa, this is shown: a lone carriage return is "^M", and a lone linefeed is "^J".
trim     Trims spaces and tabs from the end of all lines in a text file. Note that you can either modify a file IN PLACE, with "trim filename", or using stdin/stdout, with "trim <infile >outfile".
lower     Converts filenames to all lower case. By default, only changes files which are currently entirely upper case; "-a" option means to change all files, including those which are of mixed case. "-r" option means to recurse down all subdirectories. "-q" option means "quiet": only displays error messages.
lf     Directory-listing program, lists files grouped by extension. Sounds boring I know, but try it, it's actually a pretty nice format.