title: Can a batch file change the system date; save file with attributes; change date back to current date?
body: <p>Can a batch file change the system date; save file with attributes; change date back to current date?</p>
  
  <p>Goal to save MYFILE.TXT with the date of 01-01-2010</p>
  
  <p>using Batch commands.</p>
  
  <p>I have tried to set date=01-01-2010</p>
  
  <p>and then save the file, but it didn't work.</p>
  
  <p>Is this impossible?</p>
  
  <pre><code>@echo off
  rem to Run this Batch file as administrator
  
  date 01-01-2010
  echo %date%
  pause
  echo Hello World &gt; test.txt
  
  date 09-08-2010
  
  echo %date%
  pause
  
  goto :eof
  </code></pre>
  
  <p>Note: If we didn't "Run as Administrator" 
  It creates an error message of "A required privilege is not held by the client."</p>