
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.


![[HttpException (0x80004005): The length of the URL for this request exceeds the configured maxUrlLength value.]](https://cdn.saotn.org/wp-content/uploads/2025/06/Length_of_URL_for_request_exceeds_maxUrlLength_value-11-150x150.png)

