Parent Previous Next

This is a tool to delete old files from a directory and its subfolders.

For example to delete all files older than 10 days from the temp folder of all users.


rrDeleteOldFiles   directory  [-do <days_old>]  [-v]


The directory to remove files from.

Subfolders are automatically searched as well. Empty subfolders are deleted.

The directory can contain a folder with a * wildcard to be replaced by ALL folder found

 -do <days_old>

This tool does not delete files if they are not older than <days_old> days.

The default is 14 days.


Enable verbose messages

Note: There is no required order for the commandline flags.

Example commandlines

   Delete files from folder C:\temp

       rrDeleteOldFiles C:\temp -do 7

   Delete files from the temp folder of all users

       rrDeleteOldFiles -do 14 c:\Users\*\AppData\Local\Temp

   Delete files from the temp folder of all users starting with 'm'

       rrDeleteOldFiles -do 14 c:\Users\m*\AppData\Local\Temp