title: Dynamic variable in .bat files to create log according to current date
body: <p>I am SAS program user and i wrote following .bat file for task scheduling. I would like to export a log file with filename %date%_log.log. As i m new to writing .bat script (i would like to have date with format ddmmmyyyy)</p>
  
  <p>For create a enviornment variable i think i can do the following</p>
  
  <pre><code>@echo off   
  set ddmmyyyy=%date:=~4, 2%%date:=~7, 2%%date:=~10, 4%
  set logfile= "C:\log\log_%ddmmyyyy%.log"
  </code></pre>
  
  <p>While i do not know how to put it in the -Log statement. Plus i prefer ddmmmyyyy format instead of ddmmyyyy format.</p>
  
  <pre><code>REM Reference
      REM commands split over multiple lines ^ 
      REM Commends in .bat file REM
  
  "C:\Program Files\SASHome\SASFoundation\9.3\sas.exe"^
   -CONFIG "C:\sasv9.cfg"^
   -AUTOEXEC "C:\AUTOEXEC.sas"^
   -SYSIN "C:\script.sas"^
   -LOG %logfile%
  </code></pre>