Mr.Clean v. 1.00 Copyright  1995, by Kent Reisdorph, all rights reserved.
Programmer: Kent Reisdorph, 75522,1174
Date: November 11, 1995

Mr.Clean is a utility that deletes selected files from your BC++ project
directories. You can configure Mr.Clean to delete files of certain types
such as .obj, .csm, .bak, etc. The most commonly used file types are
provided in the configuration dialog box. In addition, you can add any
file type you wish to the deletion list by entering the filespec in the
edit control and clicking the Add button to add the filespec to the listbox
provided. Note that any valid filespec will do, including subdirectories.
This is useful if you use subdirectories in your projects.

I have included the full source and an IDE file. I did this so that you
could use dynamic linking and keep the file size of Mr.Clean down to
35 or 40K. As added bonuses, an example is included of a directory
selection dialog box, a centered dialog box, and a dialog box that is
displayed for a specified number of seconds and then closes.

Mr.Clean is shareware. If you like it and use it regularly please send $20
to me at the address at the end of this file. You can also register via 
SWREG. To register GO SWREG and register #8540. I depend on shareware to
supplement my income so please be fair with me. If you register you will
receive the very cool Mr.Clean background bitmap, as well as free upgrades.

Mr.Clean can be run with or without a command line. It is designed to be
run with a command line. The most effective way to do this by adding
Mr.Clean to your Tools menu in the IDE. See below for more info on the Tools
menu. The command line format is as follows:

 mrclean [path] [mode]

Mode can be either CLEAN or CONFIG, and can be upper or lower case. To clean
out a directory automatically you would use:

 mrclean \cstuff\myproj clean

If you provide a path and the CLEAN keyword Mr.Clean will run invisibly and
will pop up a dialog box for one second telling you when the cleaning
process is done.

The path must be included if you are using one of the mode keywords. To
configure Mr.Clean, run the app without a command line, or with a path and
the CONFIG keyword. If you use the CONFIG keyword then the configuration
dialog box automatically comes up, allowing you to set the file types you
want deleted. You can also use the Options|Configure menu item. The file
specs listed are those most commonly used by the Borland C++ compiler. In
addition, you can choose to have only the target .exe deleted, leaving any
support .exe files you may have in your project directory.

You can select either Global configuration or Project Specific. If you
select Project Specific then a mrclean.cfg file will be created in the
directory that you specified in the command line, or in the current working
directory if you did not provide a command line path. If you select Global
then the mrclean.cfg file in the Mr.Clean directory will be updated. Using
this feature you can have separate Mr.Clean configurations for each project.
When reading the configuration file Mr.Clean first checks the project
directory for a mrclean.cfg file. If one exists Mr.Clean uses it. If not,
Mr.Clean uses the global mrclean.cfg file. Of course, using a project
specific config file places one more file in a directory that you are trying
to clean out!

You can use the File|Change Directory menu item to change the directory to
clean out. This path will also be used to create a configuration file if you
choose Options|Configure after setting the path.

If you select the Clean Now menu item then the directory specified in the
command line will be cleaned, or the one you selected via Choose Directory.
The current directory will be reflected in the application's caption.
Important!! If you choose Clean Now with no directory selected then the
Mr.Clean directory will be cleaned.

Mr.Clean is designed to be run from the Tool menu of BC++. What I do with
small utilities like this is to place them in my \bc45\bin directory. I
then select Options|Tools, click on the 'New' button, and add the new tool
to my Tool menu. Here are the fields of the New Tool dialog box and their
corresponding values for Mr.Clean:

Name:					Mr.Clean
Path:					/bc45/bin/mrclean.exe
Command Line:	$TARGET clean
Menu Text:		Mr.Clean
Help Hint:		blank

Of course, you can put Mr.Clean in any directory that you wish, just make
sure the the path statement above contains the correct directory. Note that
the Command Line parameter reads "$TARGET clean". If you don't want Mr.Clean
to run automatically then remove the 'clean' keyword. You could add a second
item to your Tools menu called "Mr.Clean Config" and make the Command Line
read "$TARGET config" for that menu item. If you are not using a project
specific config file then just leave the Command Line field blank.

Now to clean your project directory all you have to do is click on
Tool|Mr.Clean and it's done!

WARNING! Mr.Clean takes the filespecs given it and deletes all files with
that filespec. For instance *.obj will delete all .obj files in the
specified directory. If you type *.* Mr.Clean will warn you that you are
about to do something distastrous.

I value your comments. If there are features that you want to see added,
or if you have any problems please let me know.

You can reach me on Compuserve at 75522,1174 or in one of the OWL sections
of the BCPPWIN forum on Compuserve.

Kent Reisdorph
P.O. Box 852
Aberdeen, SD 57402-0852
