Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Command Index > D

DIR

Scroll Prev Top Next More

Use the DIR command to list the files in a directory.

 

DIR

 

Option

 

ASC

Specifies to sort the directory output alphabetically in ascending order.

 

DESC

Specifies to sort the directory output alphabetically in descending order.

 

filespec

Specifies a filename, including the drive or directory. Wildcards can be used.

 

About the DIR Command

 

This command is similar to the operating system DIR command. The R:BASE DIR command pauses at the end of each full screen of information, based upon the current LINES setting. This command does not support the wide-display (/W) or pause (/P) switches of the operating system DIR command.

 

DIR lists the disk's volume label and serial number, followed followed by a list of directories and files on the disk. File information includes the file date, time, size in bytes, and name. DIR also displays the number of files (with their total bytes) and directories listed and the total bytes available on the disk. Subdirectory names, if any, are indicated with <DIR>.

 

If you specify a file name, R:BASE displays information for that file only. You can use an operating system wildcard character (question mark (?) or asterisk (*)) to display a group of files. The DIR command supports long (over 80 character) strings, and long strings with spaces.

 

Use DIR to test a file specification that uses a wildcard before using the COPY, RENAME, or ERASE commands. If the directory or disk is empty, or if the specified file(s) is not in the directory, DIR displays a "File not found." error message.

 

SHORTNAME

If you prefer the traditional format of displaying the directory contents, where the file names are listed first with the short names displayed, you can do so with the SHORTNAME setting. With SHORTNAME ON, the DIR command output lists the file name, extension, size in bytes, and the date and time stamp. DIR also displays the number of files listed and bytes available on disk. Subdirectory names, if any, are indicated with <DIR>.

 

Examples

 

Example 1:

The following command could be used to review the RX1 database files placed in the C:\RBTI folder. The display uses SHORTNAME set to OFF.

 

R>DIR *.RX1

 

Volume in drive C has no label.

Volume Serial Number is 4060-5572

 

Directory of C:\RBTI\

 

11/17/2022  09:27 AM              77,492 abc1234.RX1

04/05/2022  01:56 PM              38,016 TestUse.RX1

10/03/2016  09:24 AM              76,038 USERMGMT.RX1

10/11/2022  10:46 AM              78,486 USERMGMTX5.RX1

10/12/2022  02:38 PM              80,904 USERMGMTX_WithPUBLIC.RX1

         12 File(s)             426,974 bytes

          0 Dir(s)      386,735,194,112 bytes free

 

Example 2:

The following command could be used to review the RX1 database files placed in the C:\RBTI folder. The display uses SHORTNAME set to ON.

 

R>DIR *.RX1

 

Volume in drive C has no label.

Directory of C:\RBTI\

 

abc1234  RX1      77492 11/17/2022 09:27a abc1234.RX1

TestUse  RX1      38016 04/05/2022 01:56p TestUse.RX1

USERMGMT RX1      76038 10/03/2016 09:24a USERMGMT.RX1

USERMGMT RX1      78486 10/11/2022 10:46a USERMGMTX5.RX1

USERMGMT RX1      80904 10/12/2022 02:38p USERMGMTX_WithPUBLIC.RX1

         12 File(s)          426974 bytes

         12 Dir(s)     386734391296 bytes free