Solved Delete files and folders older than 4 days

August 29, 2012 at 00:41:17
Specs: Windows 7
hello,

I need a batch script to run as a scheduled task and check which files/folders are older than 4 days and remove them.

Any ideeas?


See More: Delete files and folders older than 4 days

Report •


#1
August 29, 2012 at 00:52:57
✔ Best Answer
http://www.computing.net/answers/pr...

(that "related posts" thing is really great for helping find these things!)


Report •

#2
August 29, 2012 at 01:39:00
Found a solution, very easy:

forfiles -p "--path--" -s -m *.* -d "-3" -c "cmd /c del @path"

It deletes files older than 3 days, works great.


Report •

Related Solutions


Ask Question