Does anyone know why does an external HDD's hidden $RECYCLE.BIN folder sometimes store GBs of deleted files even after emptying the internal HDD's Recycle Bin?
Short answer: Every time you re-install Windows, you're creating a different SID for yourself. When $RECYCLE.BIN files are owned by a previous SID from the last install, those will be ignored since you're not the same owner. cd \$RECYCLE.BIN dir /a rd /s /q [SID folder]
What does that do and is there a permanent solution to this problem? I don't want to run commands every now and then or even just once. What's SID?
I still have this issue with all my external HDDs. I have to unhide protected operating system files and then delete the files all the time. It's annoying.
yes, I always do when reinstalling windows, on the installer when selecting disks, I open CMD (Shift-F10) and type Code: cd/D D: and then Code: RD/S "System Volume Information" (with quotes) and then Code: RD/S $RECYCLE.BIN
What does that do and is there a permanent solution to this problem? I don't want to run commands every now and then or even just once.
Copy/paste/save the following as *.cmd (or .bat if you want) and run elevated: Code: @echo off for %%p in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist "%%p:\$Recycle.Bin" rundll32.exe advpack.dll,DelNodeRunDLL32 "%%p:\$Recycle.Bin" This script will delete all $Recycle.Bin found in all drives and partitions. Windows will then immediately recreate new empty ones. Make it run at startup to automatically empty all $Recycle.Bin found in all connected drives/partitions (be it HDDs, external HDDs or even USB flash drives). (By default, Windows doesn't create $Recycle.Bin folder on removable drives)
I didn't know USB flash drives had the $Recycle.Bin folder (mine don't) and in my case Windows always create it on external HDDs. How can I make it run at startup? Is this a bug? I thought there would be an easier solution.
There is no bug. Every time you perform a clean install, Windows creates a new random System SID. Your user account's SID is based on the System SID (by extending the digits). Because you're not wiping the non-Windows drives, the $Recycle.Bin folders have old folders based on your previous user SID's. You can't keep the same SID when doing a clean install. If you captured a sysprep image (without generalizing), it will keep the same SID every time that capturde image gets installed. But then you can't migrate the SID to a new Windows ISO. If you're going to constantly reinstall Windows, then do a clean-up from post-install.
If a registry tweak is applied, the system will automatically add $Recycle.Bin to USB flash drives too. So what's the problem? If you don't have it on USB flash drives, the script will process the other drives! It's not only your case!!! Windows will automatically add $Recycle.Bin to all connected drives whenever it's not detected! This is a normal behaviour of the system! Also, there are several methods of running a program or a script at startup (startup folder, task scheduler,...) Well, if this is too difficult for you, just bypass my input and wait for others.
I always wipe all the non-Windows drives and I've had this issue since after installing Windows 11 on my PC for the first time (I bought it April last year and it came with no OS installed) so that doesn't make sense. If it's not a bug, how come I didn't have it before Windows 10 (and I did multiple Windows XP and Windows 7 installs, as well)? What are SIDs and is there a way to reset Windows 11 volume number so that after each Windows 11 reinstall they start with Volume 1, 2, etc.? What do you mean by post-install and cleanup? But like I said, I've never had an USB flash drive with $Recycle.Bin folders, only external HDDs (and internal drives), so that's not needed. I simply meant my USB flash drives didn't have the $Recycle.Bin folder so I find it odd you mentioned they could, which I thought it wasn't possible. I know it is, I was just simply saying I only had the $Recycle.Bin folder in external HDDs (and internal drives), not in USB flash drives like you said it was possible to have. If Windows usually doesn't create that folder in removable drives like you said, how come I have them on all my external HDDs? OK, but one thing is deleting the $Recycle.Bin folder in every drive/partition and another is preventing this bug, which is what I want. I don't want to have this problem every time I delete something from the external HDDs (and internal drives). Also, you could have told me how to run a script at startup, like I previously asked.
Windows differentiates between removable and fixed drives. That description is a bit misleading, though. Internal drives and external hard disks (the ones having at least one partition) get the $Recycle.BIN and System Volume Information directories applied. True removable USB drives (which have no partition and act as Superfloppies) do not get any recycle bin or volume information by default. You can change that Code: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "RecycleBinDrives"=dword:ffffffff or back. Code: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer] "RecycleBinDrives"=-
Thanks, although I want to fix this issue, not create $Recycle.BIN and System Volume Information folders on USB devices which don't have them. Yes, it's misleading since external HDDs shouldn't be considered fixed drives but removable ones. I think all my USB devices (USB flash drives and external HDDs) have the System Volume Information but I can't access it because I have an error. What is this folder for and why can't I access it? What do you mean by true removable USB drives which have no partition and act as Superflopies? I thought all devices (USB or not) had at least one partition and I don't know what superflopies mean.
This RecycleBinDrives looks like a bit mask value. It would be interesting to find what every combination means. It exists even in Win7 (shell32.dll).
Now, my external HDD sometimes has less free space than it should have and only after copying its content to another drive, formatting the external HDD and copying the content back to it the external HDD shows the right one. Also, lately, my MSI Katana 15 B12VGK freezes when turning it on with an external HDD connected to the left USB-A port (the screen is black and when I disconnect the drive, it procedes). Odd. EDIT: I tried the external HDD on the right USB port and I didn't have this issue and I also tried other USB devices on the USB port where I'm having problems with said external HDD and I didn't too. Also, this problem happens when turning on the PC, not when restarting it.