bas7ex.hlp (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.
FILES Statement Programming Example
                       Example                 Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
'This example uses the FILES statement to print the names of the files
'residing on a specified disk.
 
'Note: Execution halts if you try to run this example without a disk in
'drive B or if the specified files cannot be found.
 
FILES              'Shows all files on the current directory.
FILES "*.BAS"      'Shows all files with the extension .BAS.
FILES "B:*.*"      'Shows all files on drive B.
FILES "B:"         'Equivalent to "B:*.*".
FILES "TEST?.BAS"  'Shows all five-letter files whose names
                   'start with "TEST" and end with the .BAS
                   'extension.
FILES "SALES\"     'If SALES is a directory, this statement
                   'displays all files in SALES.