[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Return the current DOS directory

     CURDIR([<cDrivespec>]) --> cDirectory


     <cDrivespec> specifies the letter of the disk drive to query.  If
     not specified, the default is the current DOS drive.


     CURDIR() returns the current DOS directory of the drive specified by
     <cDrivespec> as a character string without either leading or trailing
     backslash (\) characters.

     If an error occurs, or the current directory of the specified drive is
     the root directory, CURDIR() returns a null string ("").


     CURDIR() is an environment function that gives you the name of the
     current DOS directory, ignoring the SET DEFAULT and SET PATH settings.


     .  These examples illustrate various CURDIR() results:

        ? CURDIR("E:")     // Result: null string--root directory
        ? CURDIR("C")      // Result: CLIP53\SOURCE
        ? CURDIR("C:")     // Result: CLIP53\SOURCE
        ? CURDIR()         // Result: null string--root directory
        ? CURDIR("A")      // Result: null string--drive not ready

     .  This example changes the current DOS directory to a new value
        if it does not match a specified directory:

        IF CURDIR("C:") != "CLIP53\SOURCE"
           RUN CD \CLIP53\SOURCE

 Files   Library is EXTEND.LIB, source file is SOURCE\SAMPLE\EXAMPLEA.ASM

See Also: FILE()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson