Display a listing of files from a specified path

     DIR [<xcFileSpec>]


     <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.


     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

     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

     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.


     .  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.


     .  These examples display DOS and database files in the current

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

 Files   Library is EXTEND.LIB.


2 responses to “C5_DIR

  1. Pingback: C5 File Management | Viva Clipper !

  2. Pingback: C5 Commands | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.