It is clear that forfiles for your goals best.
You can use the dir command to sort files in the output. An example I can look at the question
that was here the other day:
You need to do the bypass on the original files (not copies), then use the above dir to the list of "original file + copies" sorted descending date modified, leave the first 3 files, the rest delete.
If you want details, then describe how and when you have created copies of the files and how are the names of the copies. Where are copies of the original files?
And actually, I would like to understand what you trying to do with this script. Apparently it's something like system of a cyclic backup of the original texts, preserving the last few copies. Why not use git?