Recycle bin on substed drives

5,464

Solution 1

  1. Browse to C:\users\.
  2. Right-click on one of the folders in this location (I chose saved games) and click properties.
  3. Select the Location tab.
  4. Click Move, browse to to root of the mapped drive, and click Select Folder.
  5. When asked "move all content?" it's your decision, I prefer "No".

A $RECYCLE.BIN is created in the mapped drive and the drive is in the list shown in the properties of recyclebin.

If you move the location back to C:\users..., the mapped drive is removed from the list of drives that are covered by recycle bin. But the Recyclebin itself remains in the mapped drive. Allowing you to access deleted files from other drives, only.

Source: Microsoft

Solution 2

I faced the same issue and since I did not find any (for me) suitable solution, I began playing and trying around a little... I copied the $Recycle.bin folder from one drive to my substed drive and this seems to be an easy and working solution.

Solution 3

There is an approach that does not require you to redirect one of the "Users" folders. I don't know why, but I was unable to get that approach to work, and I found it was really messy to undo.

This REG file is based on the information compiled from this TechNet article, which discusses how to enable the Recycle Bin. The example maps the virutal Q drive to folder "OneDrive - Test", and enables the Recycle Bin on the Q drive. Change the paths and name to suit your situation.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"Q:"="\\??\\C:\\Users\\Tony\\OneDrive - Test"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{9147E464-33A6-48E2-A3C9-361EFD417DEF}]
"RelativePath"="Q:\\"
"Category"=dword:00000004
"Name"="Q_Mapped_OneDrive"

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\KnownFolder\{9147E464-33A6-48E2-A3C9-361EFD417DEF}]
"MaxCapacity"=dword:0000c7eb
"NukeOnDelete"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{9147E464-33A6-48E2-A3C9-361EFD417DEF}]
"RelativePath"="Q:\\"
"Category"=dword:00000004
"Name"="Q_Mapped_OneDrive"

[HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\BitBucket\KnownFolder\{9147E464-33A6-48E2-A3C9-361EFD417DEF}]
"MaxCapacity"=dword:0000c7eb
"NukeOnDelete"=dword:00000000

If you only have one such mapped drive, then you can get away with the GUID {9147E464-33A6-48E2-A3C9-361EFD417DEF}. If you have multiple mapped drives, then each should be matched to its own GUID from your favorite GUID generator.

Solution 4

According to various sources, the recycle bin indeed seems to not be available for that kind of drive.

Solution 5

A Tricky way, use explorer shortcut folder to map target virtual drive:

pic1 pic2

It works in my windows 10, I choose "3D object" to map.

Share:
5,464

Related videos on Youtube

Miroslav Zadravec
Author by

Miroslav Zadravec

.NET developer Document Management Systems Business Process Management Hobbyist game developer

Updated on September 17, 2022

Comments

  • Miroslav Zadravec
    Miroslav Zadravec almost 2 years

    I've created a substed drive on Windows 7. When I delete a file, it doesn't go to the recycle bin, instead it is deleted permanently.

    Recycle bin properties do not show this drive at all.

    Any hack to send the files from substed drives to the recycle bin?

    • RobotHumans
      RobotHumans over 13 years
      not that i'm aware of....nice catch on an odd behavior
    • Keith
      Keith over 13 years
      The interesting thing about this is that prior to Vista, this wasn't a problem, and you could undelete files on SUBST drives.
  • martinako
    martinako almost 11 years
    I can confirm that this trick works. However, there is a side effect. Even if I restore the location of say "Saved Games" back to C:\users, the folder that now contains the $RECYCLE.BIN file appears renamed as "Saved Games" in the file explorer. I did this to a folder in D:\Work\Code and in the file explorer appears as D:\Work\"Saved Games". If I check the folder name from a cmd console it's still Code, and the subst I did to that folder still works, so the side effect it's limited to the file explorer
  • Admin
    Admin almost 10 years
    Does not works for me in Windows 8.1. By default it shows the drive in location columns in recycle bin properties but don't actually moved when deleted. After doing this tutorial it even stopped showing drive in location columns in recycle bin properties leaving situation intact
  • Boann
    Boann almost 8 years
    @martinako Delete the hidden desktop.ini file in that folder to restore its displayed name to normal.
  • G-Man Says 'Reinstate Monica'
    G-Man Says 'Reinstate Monica' over 6 years
    It seems like this defeats the purpose of subst. Why use subst at all if you’re going to do everything in the actual folder?
  • Gamer
    Gamer over 6 years
    You only need to use the actual folder whenever you want to delete a file. For all other purposes you can use the Subst drive letter. I like the convenience of pointing to a drive letter whenever I'm trying to open or save a file. Example, if I want to save or open something in my "Drive S," I just type "S: or S:\" and either hit the ENTER key so I can see all the files in that drive or I include the name of the file: "S:\Testfile.docx, then hit the ENTER key. Much quicker that way.
  • megamurmulis
    megamurmulis over 3 years
    Works ok on Win7 after explorer restart/relogon.<br> Using with HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Driv‌​eIcons trick to have a separate drive label from parent + custom icon.