title: how to make back up file with date and time by revising this my poor batch programming cript?
body: <p>i started as programmer from 2 month ago with batch programming.</p>
  <p>i wanted to make a batch file that can make a back up file as (file - 2022 03 30 11 51)
  so i studied batch scripting syntax on internet n wrote scripts below</p>
  <pre><code>e:
  setlocal
  set year=%date:~0,4%
  set month=%date:~5,2%
  set date=%date:~2,2%
  set hour=%time:~0,2%
  set minute=%time:~3,2%
  set second=%time:~6,2%
  mkdir temp
  echo y|copy &quot;#.xmind&quot; &quot;temp&quot;
  cd temp
  ren &quot;#.xmind&quot; &quot;# - %year% %month% %date% %hour% %minute%.xmind&quot;
  echo %date% %time%
  echo &quot;%year% %month% %date% %hour% %minute%.xmind&quot;
  pause
  </code></pre>
  <p>but %date% is not written as date of today...
  could u please, revise this script if u can or recommand another new script as batch script?</p>