title: Batch Script for Download files from FTP server with Condition
body: <p>Please need your support to crack the batch script for downloading files from FTP server with below condition.</p>
  
  <p>Requirement is need to get the current directory folder name basis on date format like "YYYY-MM-DD".</p>
  
  <p>I have tried to use the SET command but same is not working, Pl find below complete script details for your reference. Anyone please suggest and provide me the solution.</p>
  
  <pre><code>ftp
  open 11.111.13.11
  username
  password
  ***cd /data/ %Today% (Folder Name- Automatic date format required like "YYYY-MM-DD")***
  lcd d:\
  binary
  prompt
  mget *.csv
  bye
  </code></pre>
  
  <p><strong><em>script for Current Date folder</em></strong></p>
  
  <pre><code>SET Today=%Date:~10,4%-%Date:~4,2%-%Date:~7,2%
  echo %Today%
  </code></pre>
  
  <p>Please let me know if any more details required..</p>