how to check if a file was created after a specified date

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
whitlander
Posts: 1
Joined: 15 Oct 2017 14:30

how to check if a file was created after a specified date

#1 Post by whitlander » 15 Oct 2017 14:42

Hi

I'm looking to put together a script that echos the string 'compliant' depending on whether three files were created after a specified date.

\windows\system32\drivers\srvnet.sys
\windows\system32\drivers\srv2.sys
\windows\system32\drivers\srv.sys

The condition is that all these files must have been created after Feb 11th 2017 before the echo is triggered.

Can you help?

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: how to check if a file was created after a specified date

#2 Post by Squashman » 15 Oct 2017 14:46

Look at the FORFILES command.

Post Reply