Cleaning house

In my line of work it’s pretty common to get zipped up packages containing source for a project from a customer.  Unfortunately iot’s also really, really common for those zip files to be bloated will all sorts of garbage from the build, and it’s irritating – I just received a 25MB file from a customer this morning.

Typically I go through and manually delete stuff to clean it up, but this solution had a lot of subfolders, and I’m a fan of automating anything you’ve done more than twice, so I took this as an opportunity to generate a utility that does this clean up for me. 

Version 1 is very basic – it should have some command-line options, etc – but it gets the job done and changing behavior to add other files/folders/extensions is simple (see the source).  Right now it will delete any files with the following extensions: .suo, .user, .scc, .vssscc, .vspscc, .pdb and any folder with one of these names: bin, obj, Debug, Release, TempPE.

The tool and full source is available for download here

Basically if you use it and lose some all-important data then consider that an object lesson in the virtues of source control free of charge.

Here’s hoping that people start using it *before* sending me packages. If not it’s still useful for recovering drive space and cleaning up project folders before putting them in source control.

One thought on “Cleaning house”

  1. I’ve written a similiar program for my work that’s required to be run before a check-in. My only suggestion: Instead of deleting files, send things to the recycle bin if it’s available.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s