V
V
Vasily2017-03-13 17:58:27
cmd/bat
Vasily, 2017-03-13 17:58:27

How to delete files by last modified date?

Good evening (day? night?)
Task. It is necessary to select files recursively on the file washer and delete all files whose last modified date is greater than. Not to be confused with creation date, so forfiles won't work.
Several times I came across some kind of program that could do this, but I just can’t find it now.
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2017-03-13
@res2001

forfiles judging by the description just operates with date of change:
forfiles /? - key /D
There are no other standard tools for this.

N
Nadir Dolotkazin, 2017-03-13
@Q81c

The task is easy to solve using PowerShell.
The file's last modification date can be obtained via LastWriteTime . For example:
Well, then the cycle with the removal of files that match the condition. Hope you figure it out? :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question