Not too long ago I managed mail servers where each message was stored in a file. Needless to say that there were literally hundreds of thousands of files on the file system. You should note that on Windows servers, for that matter even on Unix servers, if there are too many files on the file system, regardless of their sizes, the operating system may come to a crawl. I enforced a 90 days retention policy to keep these emails. There were dime a dozen file delete programs. 90% of them were useless for the following reasons:
- No command line interface, which I am a big fan
- Could not handle volume
- Did not have enough functionality
I designed this utility (appropriately named, Killer 2000), which was developed in C (Or may be C++, I am not sure) by a guy named, Jeff in North Carolina. He did a fantastic job on this project. Jeff is currently pursuing his PhD in computer science.
Features
- Multiple folders can be specified with separate rules for deletion
- Folder inclusions by masks (pattern) can be supplied
- Folder exclusions by masks can be supplied
- File inclusions by masks can be supplied
- File exclusions by masks can be supplied
- File inclusion and exclusion masks can be overridden for separate folders
- Command line interface
- Supports UNC file naming convention
- Supports long file names and file names with spaces in it
Installation
There is really no installation as such. Copy the following files to a folder of your choice and you are good to go. There are only two files required to run the utility. The executable and the configurable file containing information like what folders, retention period etc.
- Executable (kill2k.exe)
- Help file (killer 2k_helpfile.pdf)
- Sample1 configuration file (Sample1_kill2k.ini)
- Sample2 configuration file (Sample2_kill2k.ini)
I plan to release the source code soon. You can schedule kill2k.exe in your scheduler to run at non peak hours. Keep in mind that the file system security still applies. Which means, if the utility is not run using a security context which can not delete certain files, it will not work.
Proposed enhancements:
- The log gets written only after the operation is completed. This was done to keep the efficiency in mind. However, I feel that purpose of the log is to know what is going on even at that moment.
Disclaimer: There are no warranties for the utility. It is virus free. I have provided a dry run flag to test first before you start deleting your precious files. Please read the documentation first :).
Enjoy!
View comments