Add clear-recycle-bin.ps1

This commit is contained in:
Markus Fleschutz 2021-05-02 11:21:43 +02:00
parent bc7ed352fa
commit f12b44fb48
3 changed files with 16 additions and 0 deletions

View File

@ -34,6 +34,7 @@ check-windows-system-files.ps1, checks the validity of the Windows system files
check-xml-file.ps1, checks the given XML file for validity
cherry-picker.ps1, cherry-picks a Git commit into multiple branches
clean-repo.ps1, cleans the current/given Git repository from untracked files (including submodules)
clear-recycle-bin.ps1, removes the content of the recycle bin folder (can not be undo!)
clone-repos.ps1, clones well-known Git repositories
close-calculator.ps1, closes the calculator program gracefully
close-chrome.ps1, closes Google Chrome gracefully

1 Script Description
34 check-xml-file.ps1 checks the given XML file for validity
35 cherry-picker.ps1 cherry-picks a Git commit into multiple branches
36 clean-repo.ps1 cleans the current/given Git repository from untracked files (including submodules)
37 clear-recycle-bin.ps1 removes the content of the recycle bin folder (can not be undo!)
38 clone-repos.ps1 clones well-known Git repositories
39 close-calculator.ps1 closes the calculator program gracefully
40 close-chrome.ps1 closes Google Chrome gracefully

View File

@ -90,6 +90,7 @@ Mega Collection of PowerShell Scripts
📁 PowerShell Scripts for Files & Folders
------------------------------------------
* [clear-recycle-bin.ps1](Scripts/clear-recycle-bin.ps1) - removes the content of the recycle bin folder (can not be undo!)
* [cd-desktop.ps1](Scripts/cd-desktop.ps1) - go to the user's desktop folder
* [cd-docs.ps1](Scripts/cd-docs.ps1) - go to the user's documents folder
* [cd-downloads.ps1](Scripts/cd-downloads.ps1) - go to the user's downloads folder

14
Scripts/clear-recycle-bin.ps1 Executable file
View File

@ -0,0 +1,14 @@
<#
.SYNTAX clear-recycle-bin.ps1
.DESCRIPTION removes the content of the recycle bin folder (can not be undo!)
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
try {
Clear-RecycleBin -Confirm:$false
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}