Delete files recursively with ForFiles in Windows Server

The Forfiles command on Windows selects and executes a command on a file or set of files. Forfiles is ideal for batch processing through scripts, for instance on Windows Server systems. With Forfiles, you can run a command on or pass arguments to multiple files. For example, you could run the type or del command on all files in a tree with the .txt extension.