dir
Support Library
This function is a simplified version of file browser() which provides the directory listing where you can navigate. The cursor supported navigation keys, function keys and commands are described below. If called as a function, and the Enter key is used to return, the it contains the full path name of the selected file. The differences of dir() and file browser() are the following:
Under normal conditions, the 'Support Library' is loaded automatically, so no 'include(...)' call is needed.
Not suitable for batch processing
0-2
No. | Type | Description |
---|---|---|
Opt. 1 input |
string | Path Specify an existing path. Relative paths such as specifying subdirectories, '..' for parent folder, '.' for current folder, etc. are supported. Wildcards are not allowed here. Default value: . (current folder) |
Opt. 2 input |
string | Pattern Specify the pattern to be applied for the file names. Folder names are not affected by this.
For exapmle, specify "*.xlsx,*.xlsm" to include all Excel files with and without macros.
|
Type | Description |
---|---|
string | Chosen file If the directory listed is ended by pushing [Enter] on the selected file, then the path provided and file name will be returned. |
dir;
dir ('.\Tables', '*.xlsx' );