title: filemtime() not working in Windows PHP-CLI
body: <p>I just got PHP-CLI working on my Windows machine so I could create scripts using PHP.  However, I'm trying to write a script to cleanup my Firefox downloads folder of files older than X number of days, but I can't seem to get the filemtime() function working.</p>
  
  <p>Here is the function I wrote:</p>
  
  <pre><code>function deleteOldFiles($dir, $days) {
    $mydir = opendir($dir);
    while(($file = readdir($mydir)) !== false) {
      if($file != "." &amp;&amp; $file != ".." &amp;&amp; (filemtime($dir.$file) &lt;= time() - ($days * 86400))) {
        //unlink($dir.$file) or DIE("Failed to delete $dir$file&lt;br /&gt;");
        echo filemtime($dir.$file);
      }
    }
    closedir($mydir);
  }
  </code></pre>
  
  <p>And upon running this I get the following error for every file:</p>
  
  <pre><code>Warning: filemtime(): stat failed for E:\My Documents\Downloadsphp-5.3.0-nts-Win32-VC9-x86.msi in E:\_scripts\cleanupDownloads\cleanupDownloads.php on line 10
  </code></pre>
  
  <p>From the research I've done, filemtime() should work in Windows.  What am I doing wrong?</p>