FreeDOS ASSIGN: Drive-Letter Mapping, Residency, and Safe Removal
Use FreeDOS ASSIGN deliberately by distinguishing drive-letter remapping from path substitution, checking resident state, and avoiding incompatible utilities.
FreeDOS ASSIGN redirects one DOS drive letter to another. It changes which underlying drive a letter names; it does not map a directory path to a letter. That distinction separates ASSIGN from SUBST and FreeDOS SWSUBST, which operate on paths. The difference is easy to miss because both mechanisms make an additional drive letter appear usable, but commands that depend on the current directory or address a particular device can behave differently.
ASSIGN also has a resident component and compatibility constraints. Its command page warns against using it with several disk and drive utilities, including DISKCOPY, DISKCOMP, FORMAT, LABEL, PRINT, RESTORE, and SUBST. Use it only where an application truly needs drive-letter remapping, inventory the mapping before relying on it, and clear it before troubleshooting hardware or removable media.
Understand what changes
The documented syntax supports a mapping such as:
assign B:=A:
The result is that references to drive B: are redirected to drive A:. The mapping affects the drive letter, not a specific directory. FreeDOS documentation illustrates the distinction: after assigning B to C and changing the current directory on C:, B: resolves through the drive mapping, whereas SWSUBST can retain a mapped directory path such as the directory from which it was created.
This can surprise software that stores a drive letter, assumes each letter identifies a separate physical device, or uses drive-relative paths. A command like B:FILE.DAT and a fully qualified B:\FILE.DAT should be tested in the actual application. Do not infer a stable hardware identity from the letter after ASSIGN is active.
ASSIGN does not partition a disk, mount a filesystem, create a directory, or reserve an unused letter. It is a software redirection layer. If the goal is to expose a subdirectory as a drive, use an appropriate path-substitution tool. If the goal is simply to find a missing drive, investigate driver order, LASTDRIVE, partitions, and the actual DOS device map instead of layering ASSIGN over an unknown configuration.
Inspect the mapping before use
The FreeDOS command page provides /STATUS to list active assignments and /U to uninstall a prior ASSIGN installation. The status option can also avoid loading the resident portion if none is already installed. Use the documented status form before running a utility that opens or writes a drive:
assign /status
Keep this output with the test record. A clean-looking directory listing is not proof that the drive letter points to the physical device expected. Compare the volume label, filesystem, directory contents, and physical device or image identity through a separate inventory step.
If no arguments are supplied, FreeDOS documentation says existing assignments are cleared so letters point to themselves; it also describes the command as reinstalling/clearing assignment state in its compatibility notes. Because terminology and residency can be confusing, do not use the no-argument form blindly on an unknown machine. First record the current map, consult the installed utility’s help, and test the exact cleanup behavior on an expendable configuration.
Drive discovery and drive remapping should remain separate phases in a procedure. First enumerate the volumes, partition assignments, labels, and current directories with ASSIGN absent. Then apply a mapping only if a specific legacy program requires the alternate letter. After the program exits, compare the map with the original inventory. This makes it possible to tell a physical enumeration problem from an application compatibility workaround.
Remember that DOS keeps a current directory for each drive letter. Remapping a letter can alter which underlying device supplies a relative path, while a path substitution can expose a directory under its own current-directory behavior. For a program that stores relative filenames or changes directories internally, test the exact sequence it performs. Do not assume replacing A: with B: is harmless because both names appear in a directory listing.
Resident memory and loading behavior
ASSIGN maintains a resident portion after establishing a mapping. The command documentation says not to load ASSIGN with LOADHIGH or LH in the ordinary way, and that /M is the supported option for moving its resident portion into a UMB when possible. The utility is not a conventional transient command once that portion is installed; exiting to the prompt does not necessarily remove the map or free its memory.
Plan the load in a boot profile that has the intended UMB provider configured and sufficient available blocks. Record whether /M was used, then verify the map and memory state. If a later secondary shell or TSR prevents the uninstall routine from finding its resident copy, the FreeDOS help notes that the resident assignment may remain active. Rebooting to a clean profile is safer than trying undocumented memory reclamation.
Do not repeatedly invoke multiple copies from different directories or command processors. Use one known binary, one controlled startup location, and a single mapping plan. If you must install a mapping during diagnosis, make the cleanup procedure part of the same runbook and verify the result after each step.
Avoid incompatible tools and destructive ambiguity
The FreeDOS documentation explicitly says not to combine ASSIGN with DISKCOPY, DISKCOMP, FORMAT, LABEL, PRINT, RESTORE, or SUBST. This matters because such utilities expect drive letters to identify their intended media or namespace. A remapped source or destination can make a correct-looking command operate on the wrong device. Clear or avoid assignments before any media operation that writes sectors or replaces files.
Do not use ASSIGN to “fix” an inaccessible drive until confirming the underlying device and filesystem. A wrong letter can hide the original problem and create inconsistent reports. Likewise, avoid putting an ASSIGN mapping into a shared startup file unless every boot profile and dependent program has been tested. A remapping that is helpful for one legacy application may break installation, backup, or recovery tools later.
If an application requires a particular letter, document the required mapping and its reversibility. Before installing, capture the original map. After the application exits, restore or clear the mapping through the documented procedure and verify that letters again identify the expected drives. A reboot to a known profile is a valid reset strategy when the resident utility’s state is uncertain.
Safe operational sequence
Start with no active remapping unless the application requires it. Inspect current assignments, identify the target drives independently, and check the program’s compatibility list. For a controlled application that requires B: to refer to A:, use the exact mapping syntax from the help, verify /STATUS, run one harmless read-only test, and only then proceed with the application.
Keep a concise record:
ASSIGN binary/version:
Original mapping:
Requested mapping:
Reason required:
Dependent application:
Cleanup method and verification:
This prevents a transient compatibility workaround from becoming an unexplained system-wide behavior. Never document only “B points to A”; include whether that mapping is still active and whether a restart is required to return to normal operation.
Troubleshooting
If a mapping appears ineffective, check that the intended ASSIGN binary was run and that its resident portion is present. If status is empty, confirm exact syntax and drive-letter spelling. If the mapping works in one shell but not another, investigate resident discovery and secondary command processors rather than installing another copy immediately.
If a program reads the wrong files, stop before writing. Check ASSIGN status, SWSUBST state, current directories, and the media labels. Do not use FORMAT, DISKCOPY, or DISKCOMP until drive identity is unambiguous. If removal reports failure, preserve the output and reboot into a clean configuration rather than trying random TSR-removal utilities.
When ASSIGN is present in a machine used by more than one operator, place the status check in the handoff checklist. A support session can begin after another user has loaded a mapping, so inspecting only the startup files is insufficient. Record whether the utility is resident and whether a reboot is needed to re-establish a clean device view. This prevents a transient alias from being mistaken for the physical storage topology.
ASSIGN is a narrow compatibility tool, not a general volume manager. Its safe use depends on understanding that it redirects a drive letter rather than a path, respecting the resident lifetime, avoiding its explicitly incompatible utilities, and proving the mapping is gone when the workaround ends.
Related:
- FreeDOS SWSUBST: Mapping Paths and Drive Letters Through the CDS Table
- Fixing Missing DOS Drive Letters Caused by LASTDRIVE and Driver Ordering
Sources: