Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - curdir([<c drive letter>]) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CURDIR([<C drive letter>])
 Gets name of current disk directory.
 Returns <expC> current directory of specified or default drive.

 m_dir  = CURDIR()
 m_file = SPACE(12)
 @ 12,10 SAY "Enter name of file: " GET m_file
 READ
 IF .NOT. FILE( m_file )
    ? "File " + m_file + " not found in directory " + m_dir
 ENDIF

 * Check validity of specified drive before using CURDIR.
 m_drive = SPACE(1)
 @ 12,10 SAY "Enter drive letter: ";
         GET m_drive VALID ISDRIVE( m_drive )
 READ
 directory = CURDIR( m_drive )

 Hazard
    Assumes that you have checked to make sure the optionally
    specified disk drive is valid.  If the optional drive letter
    is included, the code should check ISDRIVE() first.
    Specifying an invalid drive, such as "B" on a single-floppy
    system, can cause serious errors, including
    computer lock-up and data destruction.


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: CURDRIVE() DIRMAKE() ISDRIVE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson