PERA LogoPERA Software Solutions GmbH

Delete Old Files

Delete Old Files


The content of the %temp% directory under Windows is not getting deleted and so it gets fuller and fuller. To prevent it from filling up the hard disk I decided to write a small program which periodically deletes all the files and directories except those files or directories which are from today. This is a precaution to prevent the deletion of setup programs which may have been scheduled by an administrator in a company environment.

To make things more interesting I decided not to go the easy way and just hack a batch file together, but to write a full fledged, gold plated Qt GUI program.


Screenshot of DeleteOldFiles


Simply download the archive file, unpack it to a directory and call it at startup time. You could for example add it to the registry key 'HKEY_CURRENT_USER/SOFTWARE/Microsoft/Windows/CurrentVersion/Run'

The source code is available at