Microsoft KB Archive/49739

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


How ASSIGN Determines True Name of Disk Drive

Article ID: 49739

Article Last Modified on 11/26/2003



APPLIES TO

  • 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



This article was previously published under Q49739

SUMMARY

ASSIGN does not check the current name for the disk drive; instead, it retains the "true", original name of the disk drive for reassignment.

If floppy disk Drive A contains a single file named A.TXT and floppy disk Drive B contains a single file named B.TXT, the following commands cause the file B.TXT to be displayed in the directory:

   C> ASSIGN A=B
   C> DIR A:
                

The syntax documentation for the ASSIGN command can be checked to verify that this is what should happen. The first drive specified is the drive that MS-DOS normally reads and writes to. The second is the drive that you want MS-DOS to read and write to when the first drive is referenced.

It is not quite so intuitive how to restore A to A and B to B. The following example demonstrates how to ASSIGN the drive back to itself:

   C> ASSIGN A=A
                

After this command is issued, a DIRectory of Drive A displays the file A.TXT.


Additional query words: 3.20 3.21 3.30 3.30a 4.00 4.01 5.00

Keywords: KB49739