mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-23 14:18:38 +01:00
Add clear-recycle-bin.ps1
This commit is contained in:
parent
bc7ed352fa
commit
f12b44fb48
@ -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
|
||||
|
|
@ -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
14
Scripts/clear-recycle-bin.ps1
Executable 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
|
||||
}
|
Loading…
Reference in New Issue
Block a user