ERROR_SUBST_TO_SUBST - 139 (0x8B)
The system tried to substitute a drive to a directory on a substituted drive.
Updated: Feb 21, 2026
Technical Meaning
The ERROR_SUBST_TO_SUBST error code indicates that the system attempted to substitute a drive letter to a directory on another substituted drive. This operation is not supported by the file system and results in an error.
Error Details
This error typically occurs when attempting to map or mount one drive to a directory within another mapped drive. For example, trying to map Z: to a subdirectory of Y:, where both Y: and Z: are substituted drives, would result in this error.
Usage Context
The error is relevant in scenarios involving drive substitution or mounting operations, particularly when dealing with networked file systems or removable media. It can also occur during the execution of certain Windows API functions such as DeviceIoControl or CreateFile, which are used for low-level file system operations.
Developer Interpretation
Developers should be aware that this error code is specific to operations involving drive substitution and cannot be resolved by changing parameters or adjusting permissions. The operation must be modified to avoid substituting a drive to a directory on another substituted drive.
Related Errors
ERROR_INVALID_PARAMETER(0x57): Occurs when an invalid parameter is passed to the API function, which may include incorrect object types or unsupported operations.ERROR_PATH_NOT_FOUND(0x3A): Indicates that a specified path does not exist, which could be related if the target directory for substitution does not exist.
FAQ
Q: What causes this error?
This error is caused by attempting to substitute one drive letter to a directory on another substituted drive. This operation is unsupported and results in an error.
Q: How can I resolve this issue?
To resolve the issue, ensure that you do not attempt to map or mount one drive to a subdirectory of another mapped drive. Adjust your operations to avoid such scenarios.
Summary
The ERROR_SUBST_TO_SUBST error code is specific to file system operations involving drive substitution and indicates an unsupported operation. Developers should modify their operations to ensure that they do not attempt to substitute one drive to a directory on another substituted drive.