Last active
May 3, 2016 08:10
-
-
Save ItsMeooooooo/712cfbf2f8e4032cee88 to your computer and use it in GitHub Desktop.
Deleting files from a given list on Windows Powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$targetfolder = "C:\foo\bar\nattebums" | |
$files = gc C:\foo\bar\list.txt | |
foreach ($file in $files) | |
{write-host "Deleting $file" -foregroundcolor "Red"; Remove-Item $file | out-null} | |
write-host "D O N E" -foregroundcolor "Red" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment