I am trying to create a SCHEDULED TASK that will kick off a FORFILE loop, and terminate the process after an hour (or 12 hours). I expect there to be MILLIONS of files the the paths defined, and I want to run the task off-hours to minimize the performance impact.
The code I'm trying to run is:
forfiles /P "E:\Mutex_01" /S /M *.txt /D -5 /C "cmd /c del @path"
Looking in the logs, I don't get the sense that task is running correctly. When I enumerate the folder, there is no change. Am I missing something? How can I become the expected result?