Is there any way to search for files in a directory based on date? I want to find all files with created date greater than a specific date, is it possible to do it with dir
command?
The dir command is used to list the files and subdirectories in a directory. The "/O:D" with the dir command is used to list the files by the date of the modification from the oldest first.
Just discovered the forfiles
command.
forfiles /s /m *.log /d -7 /c "cmd /c echo @path"
Will list all the log files modified more than seven days old, in all subdirectories, though it does not appear to look at the create date. It does support specifying a specific date.
See forfiles /?
for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With