Microsoft KB Archive/37638

From BetaArchive Wiki
Knowledge Base

Unassigning Assigned Disk Drives in MS-DOS

Article ID: 37638

Article Last Modified on 11/16/2006


  • Microsoft MS-DOS 3.1
  • Microsoft MS-DOS 3.2 Standard Edition
  • Microsoft MS-DOS 3.21 Standard Edition
  • Microsoft MS-DOS 3.3 Standard Edition
  • Microsoft MS-DOS 3.3a
  • Microsoft MS-DOS 4.0 Standard Edition
  • Microsoft MS-DOS 4.01 Standard Edition
  • Microsoft MS-DOS 5.0 Standard Edition
  • Microsoft MS-DOS 5.0a

This article was previously published under Q37638


The ASSIGN command in MS-DOS is similar to the SET command. You can think of the ASSIGN command as actually being SET ASSIGN=, except the ASSIGN parameters are not stored in the environment. Whenever the ASSIGN command is issued, the parameters given as arguments define the state of the system. For example, the statement "ASSIGN a=d b=d" tells MS-DOS that whenever a reference is made to Drive A or Drive B, Drive D is to be used. If a subsequent "ASSIGN a=c" is issued, any reference to Drive A will be changed to Drive C by MS-DOS. However, a reference to Drive B will NOT be changed to Drive D. The second ASSIGN statement redefines the entire system, not just Drive A.

One consequence of this is that the current drive ASSIGNments cannot be obtained from the system by typing ASSIGN. A command of "ASSIGN" results in the restoration of all original drive assignments.

MS-DOS version 5.0 will display a list of the current assignments, by using the following syntax:

   assign /status

NOTE: MS-DOS 6.0 does not have an ASSIGN command.

Additional query words: 3.20 3.21 3.30 3.30a 4.00 5.00

Keywords: KB37638