title: 7-Zip files in all folders (multiple archives)
body: <p>How do I make 7-Zip recursively archive all files in a folder for all parent folders?</p>
  
  <p>Currently I have this:</p>
  
  <pre><code>for /d %%X in (C:\Users\mikejoh\Desktop\Modst\Ziptest\*) do "c:\Program Files\7-Zip\7z.exe" a "%%X\*.7z" "%%X\win\*"
  </code></pre>
  
  <p>But that only takes the parent folders and zips them in the same location...</p>
  
  <p>I believe I would be able to add something like a <code>DEL "%%X%</code> at the end to make it delete the files. However, in this case it would delete the whole folder :(</p>
  
  <p>Example: I have these folders below:</p>
  
  <p><img src="https://i.stack.imgur.com/K9yFo.png" alt="Enter image description here"></p>
  
  <p>These folders contain these folders:</p>
  
  <p><img src="https://i.stack.imgur.com/WGzpX.png" alt="Enter image description here"></p>
  
  <p>Where I need to zip all files in the <code>Win</code> folder:</p>
  
  <p><img src="https://i.stack.imgur.com/sNaOV.png" alt="Enter image description here"></p>
  
  <p>So for every folder it should make an archive inside the <code>Win</code> folder with all files inside the win folder.
  If everything goes well, it should delete the archived files.</p>
  
  <p>Would something like this be possible to create in a BAT file?</p>