title: Set the last modified time of a directory in Windows
body: <p>Is it possible to set the last modified time of a directory in Windows 7 from Ruby?</p>
  
  <p>I tried this:</p>
  
  <pre><code>FileUtils.touch directory_name, :mtime =&gt; new_last_modified_time
  </code></pre>
  
  <p>This works fine with files, but when I apply it to a directory, I get an exception.</p>
  
  <pre><code>C:/Progra~2/PUPPET~1/PUPPET~1/sys/ruby/lib/ruby/1.9.1/fileutils.rb:1137:in `utime': Permission denied - C:/temp/ruby-unzip-target/smc/ (Errno::EACCES)
  </code></pre>
  
  <p>This even happens if I run as administrator.</p>
  
  <p>Update: 
  I tried this from an administrator console and get the same error:</p>
  
  <pre><code>File.utime(Time.new, last_modified, target_file) 
  </code></pre>
  
  <p>I created the directory and can delete it via Windows explorer.</p>