Assign command

Updated: 11/12/2023 by Computer Hope
assign command

The assign command was introduced with MS-DOS 2.0 and has been available up to 6.0 where it was removed. It was later made available on the MS-DOS 6.0, 6.2, and 6.22 supplemental disks. The assign command redirects disk operation on one drive to a different drive.

Note

Any users of Windows 95 or later should not use this command, and instead should consider using the subst command as a substitute.

Availability

Assign is an external command file named assign.com and is available for the following Microsoft operating systems as assign.com.

Assign syntax

ASSIGN Source = Target /status
ASSIGN Assign with no switches cancels redirected drive assignments and sets them back to their original drives.
Source Letters of source drives.
Target Letters of target drives.
/status Lists current drive assignments.

Assign examples

Note

The assign command does not work with format, diskcopy, diskcomp, backup, label, restore, print or subst.

Warning

Do not use a colon (:) after a drive letter in versions before 5.0.

assign a: = b:

Assigns the A: drive as the B: drive.

assign a =  b = c

Assigns drive A: as B: and B: as C: drive.