title: 7zip command line - archive name from source file name
body: <p>How can I read name of source file and send it as archive name in 7zip using cmd archive option. </p>
  
  <p>Now I use:</p>
  
  <pre><code>7z a -t7z V:\archive.7z V:\Backup\*.bak
  </code></pre>
  
  <p>I want to check bak namefile in <code>V:\Backup</code> (there is always only 1 file) and send it as <code>archive.7z</code> - for example if in <code>V:\Backup</code> is 1 file named <code>"20131028_1100.bak"</code> I want to name archive <code>"20131028_1100.7z"</code> </p>