title: How to unzip all files in folder? (Not .zip extension)
body: <p>Currently, I am writing a script that moves PDF files that are wrongfully zipped to a certain folder. I have achieved that. The next thing I need to get to work, is that the zipped .pdf files get unzipped into a different folder.</p>
  
  <p>This is my whole script. Everything except for the last 2 lines is dedicated to finding the PDF files that are zipped and moving them.</p>
  
  <p>In the first parts, the script checks the first few bytes of every pdf file in the folder. If they start with "PK*", they are zip files and get moved to the zipped folder.
  For every PDF/zip file, there is one associated HL7 file in the <a href="https://ibb.co/bRTnsB8" rel="nofollow noreferrer">folder next to it.</a></p>
  
  <p>These also need to get moved to the same folder. From there the zip files need to be unzipped and relocated to "unzipped"</p>
  
  <p>The last 2 lines are for unzipping.</p>
  
  <pre><code>$pdfDirectory = 'Z:\Documents\16_Med._App\Auftraege\PDFPrzemek\struktur_id_1225\ext_dok'
  $newLocation = 'Z:\Documents\16_Med._App\Auftraege\PDFPrzemek\Zip'
  
  Get-ChildItem "$pdfDirectory" -Filter "*.pdf" | foreach { 
      if ((Get-Content $_.FullName | select -First 1 ) -like "PK*") {
          $HL7 = $_.FullName.Replace("ext_dok","MDM")
          $HL7 = $HL7.Replace(".pdf",".hl7")
          move $_.FullName $newLocation;
          move $HL7 $newLocation
      }
  }
  
  Get-ChildItem 'Z:\Documents\16_Med._App\Auftraege\PDFPrzemek\Zip' |
  Expand-Archive -DestinationPath 'Z:\Documents\16_Med._App\Auftraege\PDFPrzemek\Zip\unzipped' -Force
  </code></pre>
  
  <p>This, sadly, doesn't work. 
  I suspect that it's because these files dont have the .zip extension. The only Filter that works for <code>Expand-Archive</code> is .zip.</p>
  
  <p>So I need to find a way to get this function to unzip the files, even though they dont have the fitting extension...</p>