Skip to content

Instantly share code, notes, and snippets.

@keithbloom
Created October 30, 2011 07:03
Show Gist options
  • Save keithbloom/1325625 to your computer and use it in GitHub Desktop.
Save keithbloom/1325625 to your computer and use it in GitHub Desktop.
DeleteFilesContainingAString
$list = gci C:\Website\isc\* -include "*.aspx" -recurse | select-string -pattern "/user_controls/OldControl.ascx"
$list | foreach { rm $_.Path }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment