My favorite tech discovery of the week was this one: an old TechNet post titled “Enable Recycle Bin on mapped network drives.” This article helped me figure out how to get the Windows Recycle Bin working on my primary documents folder, which is a mapped drive that isn’t really a mapped drive.

For historical reasons, I store my documents on a mapped drive that is actually a deeply nested folder on my hard drive. Several years ago, my company implemented Microsoft OneDrive for file sync, sharing, backup, and so on. While that is great, it did mean that I had to move my folder tree to a very long path. Because I like to use long, descriptive names for everything, I ended up bumping into “file path too long” errors, especially in Excel. Excel will not even open a file whose path is over 256 characters long.

When your Microsoft OneDrive root folder already takes up almost 100 characters, that leaves too little left for me to use. To get around the character limit, I used the [SUBST] command in a startup script to substitute a drive letter (Z: in my case) for a folder on the C: drive.1 The downside of using SUBST is that you get no support for the Recycle Bin2. To get around that limitation, I found that using FAR Manager, rather than File Explorer, as my file manager would actually move files to the Recycle Bin upon deletion. Unfortunately, FAR Manager’s text-only interface and general jankiness led me to abandon it for Double Commander, which is superior for my needs but does not move the file to the Recycle Bin on my mapped Z: drive.

The TechNet post I found describes a way to make a .reg file that will update the Windows Registry and create a new mapped drive to whatever location you want, with full Recycle Bin support. You create the file, run it once, and you are all set. The drive, unlike one mapped with SUBST, will persist across reboots, and it will have full Recycle Bin support.

I love it, and think I should try to write a PowerShell or Python script that will create such mappings without having to edit a .reg file manually.


  1. Believe it or not, but I still remembered the SUBST command from my MS-DOS days in the late 1980s and early 1990s. ↩︎

  2. I take it for granted that it is preferable to have the safety net of the Recycle Bin, in case I delete something accidentally. ↩︎