title: time comparison in cmd
body: <p>I don't know how to code a bat file for time comparing.</p>
  
  <p>The bat file is to get current time and if the time now is 00:00 or after but before 7:00, bat file will sent a command to shutdown the computer, else, it will do nothing.</p>
  
  <pre><code>set "currentTime=%TIME%
  set flag=false
  if %currentTime% geq 07:00 if %currentTime% leq 00:45 set flag=true
  if %flag%==true (
      shutdown -s
  ) else (
      shutdown -a
  )
  </code></pre>
  
  <p>Please help, I'm a new hand, thanks.</p>