[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
CURDIR()
Return the current DOS directory
------------------------------------------------------------------------------
Syntax
CURDIR([<cDrivespec>]) --> cDirectory
Arguments
<cDrivespec> specifies the letter of the disk drive to query. If
not specified, the default is the current DOS drive.
Returns
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 ("").
Description
CURDIR() is an environment function that gives you the name of the
current DOS directory, ignoring the SET DEFAULT and SET PATH settings.
Examples
. 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
ENDIF
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