title: Windows Batch: How to append the current date and time of a format (yyyymmdd.hhmmss) in a filename?
body: <blockquote>
    <p>for /D %%A in (<em>) do "C:\Program Files\7-Zip\7z.exe" a -tzip "%%A.zip" -xr!</em>.bat "%%A" -r -x!*.xls</p>
  </blockquote>
  
  <p>The above batch will automatically zip the files in a directory.. While zipping I want to append date and time in a format (YYYYMMDD.HHMMSS)..
  For example,say the folder name is "University".If I run the batch file, the final zip name should create as "University_YYYYMMDD.HHMMSS.zip"..</p>