The following command will recursively delete files older than X number of days:

forfiles -p "C:\PATH\TO\FILES" -s -m *.* /D -[number of days] /C "cmd /c if @isdir==FALSE del @path"
  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

FileZilla FTP server recommended settings

Edit -> Settings*Note: settings not explictly mentioned can generally be left as defaults...

MySQL scheduled backups on Linux via CRON

The following commands can be added via crontab.  As-is, they will dump all MySQL databases to a...

Import MS SQL T-SQL script

A MS SQL T-SQL script can be imported via the following command-line: sqlcmd -U db_user -P...

Windows 2003 IIS will not start

Problem: IIS is stopped and trying to start it returns an "IIS admin service not started"...

MVC3 and Medium Trust

If you run .NET in Medium Trust and receive an error like this when installing MVC 3: Error...