Phone: 07941 120174
Delivering solutions to small and medium sized companies

This is how to do a simple folder purge operation

Purging files in a folder

forfiles -p "C:\what\ever" -s -m *.* /D -<number of days> /C "cmd /c del @path"

For example

Display files to be deleted

forfiles -p "C:\what\ever" -s -m *.zip /D -20 /C "cmd /c echo @FILE"

Do the actual delete

forfiles -p "C:\what\ever" -s -m *.zip /D -20 /C "cmd /c del @FILE"