Using FILES$ or FILES to Display Filename or Disk Directory (32724)
This article was previously published under Q32724
SUMMARY
The FILES$ function and the FILES statement cannot display files based
on the letters in the filenames. Wild cards in filenames, such as the
"*" or "?" symbols supported in MS-DOS file commands, are not
supported in BASIC for the Macintosh. (For example, the MS-DOS command
DIR *.DOC displays all files with .DOC in the name; however, BASIC for
the Macintosh does not have a similar feature.)
Although the FILES statement can send a disk directory to the screen,
there is no easy feature to send a disk directory to a file or array,
except through calls to Toolbox routines. (For more information, query
on the word "HFSDispatch".)
Note that the CHDIR command affects the file folder (subdirectory)
displayed by the FILES statement, but CHDIR does NOT affect the file
folder displayed by the FILES$(1) function. FILES$(1) always displays
the files in the folder where the source file is located (if run in
the interpreter), or the files in the folder where the compiled
program apl file is located (if run from a compiled program). The
FILES$(1) window lets you manually look through other folders with the
mouse.
This information applies to Microsoft QuickBASIC Version 1.00,
Microsoft BASIC Compiler Version 1.00, and Microsoft BASIC Interpreter
Version 3.00 for the Apple Macintosh.
Modification Type: |
Minor |
Last Reviewed: |
1/9/2003 |
Keywords: |
KB32724 |
|