title: Passing local variable to batch with returnStdout in jenkins pipeline
body: <p>When i try to substitute date_append variable in batch command as shown below, its not retrieving the date exactly, instead it shows as Snapshot-${date_append}.onp</p>
  
  <p>where is the exact issue?</p>
  
  <pre><code> stage('test') {
          steps {
                  script
                  {
                      date_append= "${new Date().format('yyyyMMdd_hhmmss')}"
                      echo "${date_append}"
  
                      issue=bat(label: '', returnStdout: true, script: '''echo off
               "C:\\Desktop\\eme.exe" /v 
           /source:SYS/dbname@localhost:port/env{test} AS SYSDBA 
          /target:C:\\desktop\\file-${date_append}.xml{test}  
         /scriptfile:C:\\script\\oldscript.sql
          @IF  %ERRORLEVEL% NEQ 61 (
     @echo "issue is FALSE"
    )''')
                }     
             }
         }
  </code></pre>