Selects and executes a command on a file or set of files. This command is useful for batch processing.
forfiles can be for instance used to periodically delete all files older than X days from a specific directory
forfiles -p “c:tmp” -s -m *.* -d -3 -c “cmd /c del @FILE”
This command will remove all files older than 3 days (-3) from directory c:tmp
It is not part of the normal distribution of Windows, but it can be downloaded from Microsoft Technet