This command line utility is intended to keep a directory cleaned of abandoned files. Originally intended to be run on a schedule on the Temp directory, but could have wider applications.
Syntax: Cleanup <path> [/DelOver:n] [/Empties] [/Hidden] [/Test]
<path> | The path to the directory to be processed. |
Switch | All switches are optional |
/DelOver:n | Delete files over n full days old. |
/Empties | Delete empty files and directories. |
/Hidden | Hidden files and directories will also be processed. |
/Test | Displays files and directories that would be deleted. |
Switches may be shortened to one character. For example: Cleanup %temp% /d:7 /e /h will delete everything in the temp folder that has not been opened or changed in the last 7 days, including hidden files and folders, but not the folder itself. Note: System files are never deleted.
Installation
- Click Download, click on the setup file, click on More info, click Run anyway, then click Yes to approve the installation. (That window might be minimized – look for flashing item at the bottom of your screen.)
- Note: The first time you run it, you might get a warning because the software is not “signed”. If so, click More info then Run anyway.