Possible Duplicate:
Batch file to delete files older than N days
I want to run a scheduled windows task that deletes all files from a directory that are older than 2 weeks.
The reason is that these are IIS and Tomcat logs that fill up my server, but I want to keep the most recent logs in case I need to investigate a problem.
Does any one know an easy way to do this?
Cheers
Nige
Press the Windows logo key on your keyboard, then select Settings > System > Storage. Under your hard drive information, select Temporary files. Select the Previous version of Windows check box, and then select Remove files.
Answer: No, Windows 10 does not have a duplicate finder in it yet.
exact syntax: FORFILES /p d:\new /d -30 /m * /c "cmd /c del @file"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With