title: Exclude one folder and a filetype from Get-childitem
body: <p>I have a website that needs frequent backup hence I would like to write a script to compress all the files in the screenshot. Except:</p>
  <ol>
  <li>All the contents in the <em>image</em> folder (See Highlighted)</li>
  <li>Any *.log files in the entire directory</li>
  </ol>
  <p><a href="https://i.stack.imgur.com/IfeDX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IfeDX.png" alt="enter image description here" /></a></p>
  <p>I tried to get a list of files and always end up having the image folders contents:</p>
  <pre><code>$WebAppFolder = 'C:\ReleaseBackupScript\MyWebSite'
  $filteredList = Get-childitem -path $WebAppFolder -exclude $WebAppFolder&quot;\image&quot;,*.log -Name -recurse -force
  Out-File -FilePath FilteredList.txt -InputObject $filteredList 
  </code></pre>