Windows & Desktop

Map a folder to a drive letter with subst

subst gives a local folder a drive-letter alias.

A folder card connected by a short arrow to a simple drive tile, beside a small terminal

subst gives a local folder a drive-letter alias. It can make a long working path easier to type without moving or copying the files.

Create and inspect a mapping#

Choose an unused drive letter and a folder that already exists. For example:

shell
subst Z: "C:\Work\Notes"
subst

The first command creates the alias; the second lists current mappings. Replace the example path with your own folder. Quoting matters when a path contains spaces.

Remove it when finished#

shell
subst Z: /d

Removing the mapping does not delete the underlying folder. Microsoft's subst reference documents the syntax and restrictions.

An alias is not a new disk#

The mapping provides no extra storage, isolation or encryption. Its availability can depend on the session and it should not be assumed to survive a restart. Some disk-management commands must not be used on a substituted drive; consult the reference before treating it as a physical volume.

For a simple project that benefits from a shorter path, try a dated text work log. Keep the real folder path in your backup configuration rather than relying only on its temporary alias.