title: Determine dynamic file name in Windows batch script?
body: <p>We have a single file in a fixed directory that will have the name <code>database-x.x.x.zip</code> where <code>x.x.x</code> is a version number that can change.</p>
  
  <p>We want to create a batch script that will unzip this file - we can use 7zip to unzip the file from a batch script but we need to be able to pass the file name to 7zip - how can we determine the file name in a batch script given that the file name will not be constant?  </p>
  
  <p>The script needs to unzip an archive and then run an ant file which was in the archive: </p>
  
  <pre><code>"C:\Program Files\7-Zip\CommandLine\7za.exe" x %FILE%
  ant -f %UNZIPPED_ARCHIVE_DIR%\db.xml 
  </code></pre>