title: Moving from NAnt to PowerShell. Copy/Delete replacement
body: <p>Please help me to translate this to PowerShell:</p>
  
  <pre><code>&lt;delete&gt;
    &lt;fileset defaultexcludes="false" basedir="${svnRepository}"&gt;
      &lt;include name="**/*" /&gt;
      &lt;exclude name="**/.svn" /&gt;
      &lt;exclude name="**/.svn/**" /&gt;
    &lt;/fileset&gt;
  &lt;/delete&gt;
  
  &lt;!-- Copy entire output of successful build into the svn working folder --&gt;
  &lt;copy todir="${svnRepository}"&gt;
    &lt;fileset defaultexcludes="false" basedir="${binariesFolder}"&gt;
      &lt;include name="**/*" /&gt;
      &lt;exclude name="**/Bin/*.pdb"/&gt;
      &lt;exclude name="**/Bin/*.xml"/&gt;
    &lt;/fileset&gt;
  &lt;/copy&gt;
  </code></pre>
  
  <p>PowerShell</p>
  
  <pre><code>Get-ChildItem -recurse "$svnRepository" | ? {$_.FullName -notmatch '.svn'} | Remove-Item -Recurse
  </code></pre>
  
  <p>I've tried to write something like above, but it doesn't exclude all SVN directories in nested foldes, e.g if I have a directory <code>C:\blabla\test</code> with nested .svn it will ignore <code>C:\blabla\test\.svn\*</code> but at the same time it will try to remove <code>C:\blabla\test</code> itself</p>