Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ assign(CMD) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 assign(CMD)                     19 June 1992                     assign(CMD)


 Name

    assign - redirect requests for disk operations on one drive to a
    different drive

 Syntax


    assign [x[:]=y[:][...]]

    To redirect all drive letters to their original drives, use the following
    syntax:

    assign

    To display a list of the current assignments, use the following syntax:

    assign /status


 Description

    Some older programs can read and write files only on drives A and B.
    With the assign command, you can redirect disk operations for those
    programs so that you can read and write files on drives other than A and
    B.

 Parameters


    x       Specifies the drive from which you want to redirect read and
            write operations. This value must be a letter.  The use of the
            colon (:) is optional.

    y       Specifies the existing drive to which you want to redirect read
            and write operations.  This value must be a letter.  The use of
            the colon (:) is optional.


 Switch


    /status Lists current assignments.  You can abbreviate this switch as
            /sta or /s.


 Notes


    Invalid uses of assign

    You must not assign the drive letter of your hard disk to another drive.
    You should not use assign for a drive that is in use by a program.

    You cannot use the drive letter of a hard disk drive that does not exist
    for either the x or the y parameter.

    Avoid the use of assign in the following cases:

    +  With commands requiring drive information:  (backup, join, label,
       restore, subst)

    +  With the diskcopy and format commands, which ignore drive reassign-
       ments

    +  During typical use of MS-DOS, unless a program cannot read and write
       files on the specified drive


    Using assign with the append command

    If you use both the assign and append commands, you must use append
    first, even if the commands affect different drives.

    Using assign for network drives

    You can use the assign command for network drives.

    Canceling a previous assignment as the result of a new assignment

    Assigning a drive letter to a drive cancels previous assignments to it.
    Suppose you assign drive A to drive letter C, as the following example
    shows:

       assign a=c


    Later you assign drive B to drive letter C, as the following example
    shows:

       assign b=c


    As a result, drive A is no longer assigned to drive letter C.

    Using the subst command instead of assign

    You should use the subst command instead of assign.  The following com-
    mands are equivalent:

       assign a=c

       subst a: c:\


 Examples

    Suppose you want to use drive C to read and write files, but your program
    requires you to put your program disk into drive A and your data disk
    into drive B.  To reassign the drive letters A and B to drive C, type the
    following command:

       assign a=c b=c


    This command causes MS-DOS to look for your program and data files on
    drive C.

    To reset all drive letters to their original drives, type the assign com-
    mand without parameters, as follows:

       assign


 Related command

    For information about associating a drive letter with a path in a way
    that ensures compatibility with future versions of MS-DOS, see the
    subst(CMD) command.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026