I'm trying to catch all the files in a folder taking in account two filters, the first one is the creation date have to be greater than 01/01/2020 and the creation date have to be lower that today-6.
I don't know how to apply two filters in the same forfiles command line.
This is what I have:
forfiles /P c:\temp /D +01/01/2020 /C "cmd /c echo @path"
Well,
forfilesdoesn't filter for the creation date, rather does it regard the last modification date (though not the time), and it supports only a single such filter.However, you may nest two commands:
Note, that the expected date format behind
/Ddepends on the actual locale settings.Also refer to this post: FORFILES date -after- (date calc in cmd file)