Delete Files on Certain Dates
Category:Files and Directories
Version Compatibility: Visual Basic 6, Visual Basic 5
This is a good snippet of code I engineered for a client of a major technology company. You can identify what type of files to delete (by extension), set a multitude of different locations, and by combination with Scheduled Tasks, you can set this to run as often as you like. Make sure your system clock is up to date, as the code takes a dump from these settings. Make sure your indentations appear correctly.
Instructions: Copy the declarations and code below and paste directly into your VB project.