I
I
ivanfrolp2019-06-04 16:43:17
PowerShell
ivanfrolp, 2019-06-04 16:43:17

Is it possible to organize the following functionality only by using the command line or powershell?

There is a folder. Every day 5-6 files are created there. It is impossible to know in advance exactly how many files will be created there, but usually 5 or 6. It may be that they are not created every day, for example, it may be that they were created on June 1, there are no 2nd and 3rd, 4th was created again.
I need to copy these files, and only copy the ones with the creation date closest to today.

Here is a real example
5cf672ee33bde222271470.png

To be clear about what I want:
1 Sort files by date created (or modified)
2 Get files whose creation date is closest to today's date
3 Copy these files to another folder

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Ezhyg, 2019-06-04
@ivanfrolp

Tasks on bat files

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question