Powershell Tip #74: Empty the recycle bin

By | November 21, 2015

Tip: You can empty the recycle bin:


3 thoughts on “Powershell Tip #74: Empty the recycle bin

  1. Pingback: Powershell Tip #75: List only hidden files in a folder | Powershell Guru

  2. Terry

    The path can be a local drive or network drive..
    To view their sizes

    Get-ChildItem C:\ -Directory -Hidden -Filter ‘$REC*’ -Recurse | Select-Object Name,FullName,@{l=”Size in MB”;e={“{0:N2}” -f ((Get-ChildItem $_.FullName -Force | Measure-Object -Property length -sum).sum / 1MB)}}


    To remove ALL $Recycle.bin folders

    Get-ChildItem C:\ -Directory -Hidden -Filter ‘$REC*’ -Recurse|Remove-Item -Force -Recurse


Leave a Reply

Your email address will not be published.