Posted By

danfsmith on 02/03/11


Tagged

remove-item


Versions (?)

Remove Items from list


 / Published in: Windows PowerShell
 

  1. $todelete = Get-Content .\remove-files.txt
  2. Get-ChildItem -recurse | Where-Object {$todelete -contains[io.path]::GetFileName($_\3)} | Remove-Item

Report this snippet  

You need to login to post a comment.