There is a folder. There are created every day 5-6 files. In advance how many files there are created, it is impossible to know, but usually 5 or 6. May be such that they are not every day, for example, it may be that June 1 was created, 2nd and 3rd no, 4th was again created.
I need to copy these files, and copy only those whose creation date is the closest to date.
If you clearly describe what I want:
1 Sort files by date created (or modified)
2 Take the files with creation date closest to today's date
3 to Copy these files to another folder