qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
GetDir Procedure
  ◄Summary► ◄Details► ◄Example►                                   ◄Back►
 
  Arguments
 
    drive        Integer expression in the range 0..26, representing
                 the drive to be checked
 
    directory    String variable receiving the current directory of
                 specified drive
 
  Description
 
    The GetDir procedure gets a string that represents the current
    directory for a specified drive.
 
    Specify the drive to be checked by passing a byte value. To indicate
    the current drive, pass a value of 0. To indicate a specific drive
    letter, pass the numeric equivalent: drive A=1, B=2, ..., Z=26.
 
    To represent the drive with a letter, use the Ord and UpCase
    functions to convert the character to a byte:
 
       GetDir( Ord( UpCase( ch ) ) - 64, directory );
 
    If the specified drive does not exist or is not ready, the returned
    string contains the drive letter followed by a colon and backslash,
    representing the root directory.
 
    If the drive value is out of range, the returned string contains a
    meaningless character followed by a colon and backslash.