I have referred to this page, Batch file to delete files older than N days. and the code works, but only for a predefined no of days.
forfiles /p "C:\what\ever" /s /m *.* /D -<number of days> /C "cmd /c del @path"
But now, I want to initiate a program such that I can find the oldest date from C:\what\ever, then delete the files in that folder and subdirectories, one day at a time, to a pre-defined date, or days. For example, the oldest date is 11/04/2020, I wanna delete from 11/04/2020, then 12/04/2020...all the way to 29/5/2022 or -1 day. (As of typing this, the date is 30/5/2022).
Thank you.