Skip over navigation

The Lost continent of

You've found a bug on my site!

Pluralitas non est ponenda sine necessitate

William of Ockham (aka Ockham's Razor)

MFCClean v1.4

Keep the Source Tree Clean

Newsbreak! MFCClean is on the way out...

This program and this page are not for much longer in this world. When I programmed for, and in, Windows I used to write programs like this a lot to make up for deficiencies in the platform. However, I have not used this program in years (and don't even know if it is useful for recent versions of Visual C++).

A decent programming enviroment/shell makes MFCClean quite obsolete. Under Linux or Mac OS X I use a Makefile rule, or a simple shell script to keep my source trees clean... Any programmer that ever found MFCClean useful should check out the GNU programming tools. If you have to use Windows you can install them using the Cygwin emulation suite.

MFCClean is a tiny 32-bit command line freeware utility written for Visual C++ programmers. It searches through a directory tree deleting large temporary, binary, build files, such as precompiled headers, that use a huge amount of disk space (unnecessarily when you're not actually coding).

Call it from a batch file just before running a backup or commiting to CVS, run as part of a login script, as a desktop icon for a quick double click...

I use it just before my daily backup, and after a coding session - just to keep things tidy.


Run with no arguments the program searches the current directory and all subdirectories, deleting all .pch, .ilk, .obj, .pdb, sbr, .bsc & .idb files. You can specify a drive or directory as a command line argument, eg:

('Cleans' current Directory, and all sub-directories)
MFCClean d:\visualc++\
(All directories under d:\visualc++)
MFCClean \\server\c\
(All directories on C:\ drive of machine named 'Server'
- given proper permissions, of course...)


Simplicity itself.

Download, 5kB.

There is a single zip file, containing the executable, and a single readme.txt file. You are free to distribute this package to whom so ever you like, just so long as you keep the two files together.


  • 1.4 - Added .sbr and .bsc files to kill list
  • 1.3 - Nothing much - removed some debugging code, and did some general tidying up, drastically reducing the executable file size.


(That's Frequently Asked Questions...
...But then, you already knew that.)

It does what?
Were you a C++ programmer using Microsoft's excellent Visual C++ complier, you would find this program useful in deleting temporary files from your hard-disk. These files are often in the 5-10 Megabyte range, and are used to speed up the build process. You don't really need them when you're not actively programming, so it makes sense to delete them. You would certainly want to delete them before making a backup, or sending the project to someone...

What does it cost?
It's freeware. That means, unlike some of my programs, you can download and use it forever, for free. You can even make copies for everyone you know. If you really like it, an email of appreciation wouldn't go amiss, but don't feel that you have to.

What's a Command-line again?
A Command line program (sometimes called Console) looks like a DOS program (and sometimes is). You know, white text, black background, no mouse... This program is not a DOS program. It's a 'proper' 32 bit application and must be run under Win9x/NT. The advantage is you don't have to waste memory on a fancy-pants graphical UI (user interface) - a bit of an over kill for a program like this.

That's cool, but can you make it delete all *.xxx files instead?
Yeah, probably - if there is general interest in versions modified for other programming environments etc.. I'll recompile, and post them here. I won't be witting a version that accepts an extension as an argument though. There's just too much risk of terrible accidents (Oops, there go ALL of my .EXEs on C:\ drive....)