Fix ERROR_SAME_DRIVE (0x0000008F) on Windows 10/11
This error pops up when you try to map a drive letter to a folder on the same drive. Here's how to fix it fast.
What causes ERROR_SAME_DRIVE (0x0000008F)?
The error message is clear once you know what to look for: "The system cannot join or substitute a drive to or for a directory on the same drive." This means you're trying to use the subst command or net use to map a drive letter to a folder that lives on the same physical drive as the drive letter itself.
Here's a real-world example. Say you're in Windows 11 and you open Command Prompt as admin. You type:
subst D: D:\MyFolder
That will trigger error 0x0000008F every time. Why? Because you're telling Windows to pretend that drive D: is a shortcut to a folder that's already on drive D:. You can't substitute a drive for a directory on itself. It's like trying to lift yourself by your own bootstraps — Windows won't let you.
This error usually shows up when someone's automating drive mappings in scripts, or when they're trying to create a fake drive for organizing files. The fix is simple, but you need to understand the rule: the target folder must be on a different drive than the drive letter you're substituting.
Cause 1: Drive letter and folder are on the same physical drive
This is by far the most common reason. You're trying to substitute, say, F: for F:\Projects. That fails. Always.
The fix: Use a different drive letter
- Open Command Prompt as Administrator (search "cmd", right-click, choose "Run as administrator").
- Check which drive letters are available. Run
substwith no arguments — it'll show any existing substitutions. Also look in File Explorer to see which letters are in use. - Pick a drive letter that's not the same as the folder's root drive. For example, if your folder is on
C:\Data, useZ:orX:— anything butC:. - Type this command and press Enter:
Replacesubst X: C:\DataX:with your chosen letter. - After hitting Enter, you should see no error. Open File Explorer — you'll see a new drive called
X:that shows the contents ofC:\Data.
What you'll see: That new drive shows up under "This PC" with the same icon as your local drives. You can browse it like a real drive.
If you still get the error, make sure the folder path actually exists. Typo the path and Windows won't say "folder not found" — it'll just give you the same 0x0000008F error. Double-check your path with dir C:\Data first.
Cause 2: Using the wrong command for the job
Some people confuse subst with net use or mountvol. The subst command is for drive substitution only — it maps a drive letter to a folder path. It won't let you map to a network share or a volume GUID.
But I've also seen users try net use with a local path. That's another way to hit this error. net use is for network shares, not local folders.
The fix: Use the right tool
- For local folders: Use
subst(as described above). - For network shares: Use
net use Z: \\Server\Share. - For mounting a volume to a folder: Use Disk Management or
mountvol. That's different — you're attaching an entire partition to a folder path, not a drive letter.
If you need to map a local folder permanently, use subst in a startup script or use the REG ADD command to add a registry key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices. That's more advanced, but it survives reboots.
Cause 3: The folder path contains a drive letter inside a junction
Junctions (also called directory symlinks) can trick you. If you have a folder like C:\Junction that points to D:\RealFolder, and you try subst D: C:\Junction, you'll get the error. Windows sees that the junction ends up on the same drive as the folder inside it.
This one's rare but real. I've seen it happen when someone created a junction to organize files and then tried to substitute a drive for the junction.
The fix: Resolve the actual target
- Open Command Prompt.
- Run
dir /a l C:\Junction— look forin the output. If you see it, the folder is a junction. - Find the real target by running
fsutil reparsepoint query "C:\Junction". Look for the "Substitute Name" in the output — that's the actual folder. - Use that actual path in your
substcommand, not the junction. For example, if the target isD:\RealFolder, use a different drive letter, likeE:.
After doing that, the subst should work. Junctions aren't broken — they just don't play nice with subst when the drive letter matches.
Quick-reference summary table
| Cause | What's happening | Fix |
|---|---|---|
| Same drive letter and folder | subst D: D:\Stuff — fails because they share drive D: |
Use a different drive letter (e.g., subst Z: D:\Stuff) |
| Wrong command | Using net use with a local path |
Switch to subst for local folders |
| Junction in the path | subst D: C:\Junction where junction points to D:\Real |
Find the real target folder and use a different drive letter |
That's it. Nine times out of ten, it's cause #1. Change the drive letter and you're done in 30 seconds. For the other cases, these steps will get you sorted without needing to reboot or install anything.
Was this solution helpful?