title: How to pass list of files to winrar/7z for archiving in cmd
body: <p>Lets say I've a text file which contains paths to specific files e.g.</p>
  <p><em>myFiles.txt</em></p>
  <pre><code>c:\users\%username%\desktop\file1.pdf
  c:\users\%username%\desktop\junk.ppt
  c:\users\%username%\desktop\image.jpg
  c:\users\%username%\downloads\d1.dwg
  d:\someFolder\random.exe
  .
  .
  .
  .
  f:\folder2\code\myprog.cpp
  </code></pre>
  <p>How can I pass this list to <code>rar.exe</code> or <code>7z.exe</code> so that it can archive these files e.g.</p>
  <pre><code>rar.exe myarchive.rar myFiles.txt
  Or
  7z.exe myarchive.zip myFiles.txt
  </code></pre>