title: Windows Batch file to check modified date of file and output to log file if not a specific value
body: <p>I am need to log systems that do not have a specific file in a specific folder and have created the below batch which works fine. It will be called by the domain logon script (Clients are Windows XP in a 2003 AD domain):</p>
  
  <pre><code>IF EXIST "C:\Documents and Settings\%username%\Application Data\Microsoft\Outlook\test.OTM" (
  goto END
  ) ELSE (
  echo %DATE%_%TIME%_%COMPUTERNAME%  &gt;&gt; %LOG1%
  )
  </code></pre>
  
  <p>In addition to this, however, if the file is present I need to check that it has a specific modified date and if not then output it to a log file. So far I am stumped and would greatly appreciate any feedback/help on this. Thanks.</p>