I would like to get the path to recycle bin. I searched online and found people use shell32 and get a list of files in recycle bin. However, I only want to get the path of r
here is the recycle bin directory C:\$Recycle.Bin
...if you want to get the files un-hide
the
diretory...
I had a server bogged down with over 590,000 files in the Recycle Bin. Any attempt to open the recycle bin caused the server to run out of memory and crash.
This code worked from Powershell ISE. It took almost 30 minutes. No errors.
Get-ChildItem -Path 'C:\$Recycle.Bin' -Force | Remove-Item -Recurse -ErrorAction SilentlyContinue
Please check this link. This may help you to get the path to recycle bin.
Here you can access the URL C:\$Recycle.Bin