title: How to get last modified date on Windows command line for a set of files?
body: <p>I have been using the following command to get the file date. However, the <code>fileDate</code> variable has been returning blank value ever since we moved to a different server (Windows Server 2003).</p>
  
  <pre><code>FOR /f %%a in ('dir myfile.txt^|find /i " myfile.txt"') DO SET fileDate=%%a 
  </code></pre>
  
  <p>Is there any other more reliable way to get the file date?</p>