Skip to content

Commit 5dbe443

Browse files
authored
Create DeleteThatAnnoyingFile.ps1
1 parent 245c578 commit 5dbe443

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Script to search for and delete a named file in structure
2+
$files = ls -Path . -Filter "annoying.txt" -Recurse -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName
3+
ForEach ($item in $files) {
4+
Remove-Item -force -path $item
5+
}

0 commit comments

Comments
 (0)