title: Powershell: Multipart RAR extraction
body: <p>I have a folder with n number of rar files with some having .part01,.part02 as they are divided. the code i am currently using is given below.</p>
  
  <pre><code>$Rars = Get-ChildItem -path 'c:\demopath' -filter "*.rar"  
  $Destination = 'c:\demopath'
  $WinRar = "C:\Program Files\WinRAR\WinRAR.exe"
  
  
  foreach ($rar in $Rars)
  {
  &amp;$Winrar x -y $rar.FullName $Destination
  Get-Process winrar | Wait-Process
  }
  </code></pre>
  
  <p>This code is running many times to extract same file again and again by the number of parts it has. example if the file is having 3 parts it will get extract same file 3 times (overwriting the previously extracted file). for single rar file there is no issue. if i only give "x" then it is giving popups for file already exists. need a solution which will not give any popups and extract only if same name file is not there in the directory.
  can someone help me to fix this issue?</p>