Delete Files Older Than x Days - ForFiles.exe - Script Issues
I'm having a little issue with a batch script that I've managed to create, using information from various posts and forums on the web but can't quite get it right.
Can anyone offer any help?
I'm wanting the script to check a folder's contents by the age and delete anything over 5 days old, the script I have at the minute is as follows:
forfiles /p "C:\CCTV\Channel1\" /s /D -5 /M *.* -C "cmd /C del /Q"
The command prompt then opens and lists a lot of files but then nothing is deleted once the process is complete.
Thanks in advance