title: PowerCenter - Extract Date from source filename
body: <p>I want to extract the date of an empty file , example :</p>
  
  <p><strong>Orders_05012015.txt</strong></p>
  
  <p>This, to occupy it as a variable to query the database.</p>
  
  <pre><code>select * from orders Where date = $$Date_order (05012015)
  </code></pre>
  
  <p>I try to do this task by command , but I only get it via examples of AWK and I'm in windows</p>
  
  <p>Example via awk:</p>
  
  <pre><code>SET CompletePath=\\192.168.20.175\infa_shared\SrcFiles\CRED20102009.csv
  SET JustFileName=`basename $CompletePath`
  echo $JustFileName|awk -F"." '{print $1}'|awk '{print substr($1,length($1)-7, length($1))}'
  </code></pre>