Juan Elosegui

Organizing Development Drives with Windows Drive Letters

Tuesday, 26 August 2025

A few years ago I got tired of typing long paths and hunting for projects across machines. I wanted muscle‑memory shortcuts I could rely on anywhere, so I mapped three predictable drive letters and never looked back. Now I can jump to any project in seconds, my scripts work the same on every box, and setting up a new machine is basically copying a single .reg file.

The Three-Drive System

I use a simple yet effective system with three dedicated drive letters:

  • P: for Projects
  • T: for Trash (temporary work)
  • U: for Utils (tools and utilities)

Why I do this

  • Fast navigation: P:\my-app is always the same path on every machine
  • Predictable automation: scripts and docs reference P:/U: instead of machine‑specific paths
  • Consistent tooling: all utilities live under U: so my PATH setup is identical everywhere
  • Easy rebuilds: restore one registry file and I’m productive in minutes

Setting Up Drive Letters

You can set this up using the Windows Registry. Create a .reg file with the following content:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"P:"="\??\\E:\\dev\\Projects"
"T:"="\??\\E:\\dev\\Trash"
"U:"="\??\\E:\\dev\\Utils"

Consistent PATH for tools

I keep my command‑line tools under U:\bin and add it to PATH the same way on all machines:

:: From an elevated Command Prompt (system‑wide)
setx /M PATH "%PATH%;U:\\bin"

PowerShell equivalent:

setx /M PATH "$env:PATH;U:\\bin"

How It Works

Projects Drive (P:)

  • Main development workspace
  • Each project gets its own directory
  • Clean, organized structure for active projects
  • Easy to reference in configuration files and documentation

Trash Drive (T:)

  • Temporary work and experiments
  • Quick tests and prototypes
  • Files you might need temporarily but can safely delete later
  • Perfect for "throwaway" code

Utils Drive (U:)

  • Development tools and utilities
  • SDKs and development kits
  • Shared resources across projects
  • Scripts and tools you've created

Remember to run the registry script with administrator privileges, and you might need to restart your computer for changes to take effect.

Enabling the Recycle Bin

By default, Windows doesn't enable the Recycle Bin for mapped drives. This means any files you delete from these drives are permanently removed without going to the Recycle Bin first. However, you can enable this safety feature with some additional registry entries.

Create a registry file with these entries:

Windows Registry Editor Version 5.00

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

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

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

This configuration creates known folder entries for each drive, enabling Windows to properly handle them.

After applying these changes and restarting your computer, the Recycle Bin will work normally with your mapped drives, providing an extra layer of safety for your development work.

Customizing Drive Labels and Icons

You can make your drives even more user-friendly by customizing their labels and icons. Here's how:

Custom Drive Labels

You can set custom labels for your drives using the registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\P\DefaultLabel]
@="Projects"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\T\DefaultLabel]
@="Trash"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\U\DefaultLabel]
@="Utils"

Custom Drive Icons

You can also assign custom icons to each drive through the registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\P\DefaultIcon]
@="C:\\Windows\\System32\\shell32.dll,3"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\T\DefaultIcon]
@="C:\\Windows\\System32\\shell32.dll,31"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\U\DefaultIcon]
@="C:\\Windows\\System32\\shell32.dll,8"

Let's break down the icon registry entry:

  • DriveIcons\P\DefaultIcon - Creates an icon entry for drive P:
  • @="" - Sets the default value (@ symbol represents the default value in registry)
  • C:\\Windows\\System32\\shell32.dll - Path to Windows' built-in icon library
  • ,3 - The index number of the specific icon within shell32.dll (each number represents a different icon)

You can use any of these options:

  1. Windows built-in icons: C:\\Windows\\System32\\shell32.dll,NUMBER (replace NUMBER with 0-300)
  2. Custom icon file: C:\\Path\\To\\Your\\Icon.ico (no comma needed)
  3. Icons from other system DLLs: C:\\Windows\\System32\\imageres.dll,NUMBER

After applying these changes and refreshing Explorer (or restarting), your drives will have custom names and icons, making them instantly recognizable in File Explorer.

đź’ˇ Tip: To explore available icons in shell32.dll, you can use tools like Resource Hacker or simply search online for "shell32.dll icon index" to find visual references.

Full setup script (.reg)

Save as something like map-dev-drives.reg, run as Administrator, then restart:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices]
"P:"="\??\\E:\\dev\\Projects"
"T:"="\??\\E:\\dev\\Trash"
"U:"="\??\\E:\\dev\\Utils"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\P\DefaultLabel]
@="Projects"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\T\DefaultLabel]
@="Trash"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\U\DefaultLabel]
@="Utils"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\P\DefaultIcon]
@="C:\\Windows\\System32\\shell32.dll,3"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\T\DefaultIcon]
@="C:\\Windows\\System32\\shell32.dll,31"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\U\DefaultIcon]
@="C:\\Windows\\System32\\shell32.dll,8"

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

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

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{9147E464-33A6-48E2-A3C9-361EFD417DE2}]
"RelativePath"="U:\\"
"Category"=dword:00000004
"Name"="U_Drive"
comments powered by Disqus