[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|             CURDIR              |
+---------------------------------+
CURDIR([<expC>])

-----------------------------------
Returns current DOS directory.
Return value - Character
-----------------------------------

<expC>
        Drive. If <expC> is omitted, the current default drive is assumed
(FoxPro's SET DEFAULT drive).  The null string is returned if no such
<expC> drive exists. CURDIR() ignores the FoxPro SET PATH values.

+---------------------------------+
|             Examples            |
+---------------------------------+
? CURDIR()

SET DEFAULT TO C:\FOXPRO\TUTORIAL
? CURDIR('C')

SET DEFAULT TO C:\
? CURDIR('C')           && root

+---------------------------------+
|         Program Example         |
+---------------------------------+
In example below, FoxPro looks to see if current directory for C drive
is \FOXPRO\SAMPLE.  If not, it sets default to that directory.

IF NOT CURDIR('C') = '\FOXPRO\SAMPLE\'
   SET DEFAULT TO C:\FOXPRO\SAMPLE
ENDIF

-----------------------------------

See Also:  FULLPATH(), SYS(2003) Current directory

-----------------------------------

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