[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 DIR*
 Display a listing of files from a specified path
------------------------------------------------------------------------------
 Syntax

     DIR [<xcFileSpec>]

 Arguments

     <xcFileSpec> is a template that must be matched by displayed files
     and can include standard wildcard (* and ?) characters.  You can specify
     <xcFileSpec> as a literal file specification string or as a character
     expression enclosed in parentheses.

 Description

     DIR is a file command that displays a listing of files from the
     specified path in one of two formats depending on whether you specify
     the <xcFileSpec> argument.  If you do not specify a path, DIR displays a
     standard listing of database files from the current or specified
     directory.  The list includes the database file name, date of last
     update, and number of records.  Including the option <xcFileSpec>
     displays a list of all files in the specified directory.  This list
     includes the file name, extension, number of bytes, and date of last
     update.

     If no path is specified, DIR displays files from the current DOS drive
     and directory unless SET DEFAULT has been used to specify a new default
     directory.

     DIR is a compatibility command and therefore not recommended.  It is
     superseded by the DIRECTORY() function which returns an array of file
     information from a wildcard pattern.  Using this array, you can display
     file information to screen.

 Notes

     .  Directory picklists: To present directory information to the
        user, use ADIR() to return one or more arrays of directory
        information, and ACHOICE() to present a picklist to the user.

 Examples

     .  These examples display DOS and database files in the current
        directory:

        cFilespec := "*.*"
        DIR (cFilespec)            // Display all files
        DIR                        // Display all (.dbf) files
        DIR *.prg                  // Display all program files

 Files   Library is EXTEND.LIB.


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