I'm wanting to list the files that are in the recycle bin in Vista from the command line. So far I have this..
dir C:\$Recycle.Bin /s /b >> recyclebin.txt
That does alright, the output I get is this..
C:\$Recycle.bin\S-1-5-21-931442927-344369455-2477061601-1000\$I2H8K48.zip
C:\$Recycle.bin\S-1-5-21-931442927-344369455-2477061601-1000\$IE94UAG.exe
C:\$Recycle.bin\S-1-5-21-931442927-344369455-2477061601-1000\$IR4P99W.rar
C:\$Recycle.bin\S-1-5-21-931442927-344369455-2477061601-1000\$R2H8K48.zip
C:\$Recycle.bin\S-1-5-21-931442927-344369455-2477061601-1000\$RE94UAG.exe
C:\$Recycle.bin\S-1-5-21-931442927-344369455-2477061601-1000\$RR4P99W.rar
And I only have 3 files in my recycle bin named auto-it-v3-setup.exe, fcleanerportable.rar and Reinstall.rar.
Is there anyway to get these names into a txt file list, rather than those code-named files above??
To list files in Recycle Bin by their original location using PowerShell (save as file.ps1, remove line breaks before | so that you get only two lines):
I found this script here. And use this command from my batch file to call it
Save the following as
recyclebin.vbs
: