title: Trying to copy every nth file from subfolders of a folder in same folder structure to a folder
body: <p>this only copies the empty folders. i am trying to copy every nth file from subfolders of a folder in same folder structure to a folder</p>
  <pre><code>$Files = Get-ChildItem &quot;D:\n.a.d\excel backups\autorecover backups\Excel\New folder (2)&quot;
  $i = 0
  Do{
      $files[$i]|copy-Item -Dest &quot;D:\n.a.d\excel backups\autorecover backups\Excel\New folder (3)&quot;
      $i=$i+2
  }While($i -le $files.count)
  }
  </code></pre>