Repository navigation
dos_dir
Dale Fugier edited this page Jul 1, 2026
·
1 revision
Returns a list of files in a directory. The function is very similar the command prompt's DIR command.
(dos_dir [filespec [format]])
filespec
The desired file or files. filespec can contain wildcard characters ("" and "?"). If filespec is not specified, all files (.*) in the current directory are returned.
format
The format of the filenames returned. The default value is 0. The allowable values are as follows:
| Value | Description |
|---|---|
| 0 | None. |
| 1 | Sorted alphabetically, ascending. |
| 2 | Sorted alphabetically, descending. |
| 3 | Sorted by date, ascending. |
| 4 | Sorted by date, descending. |
| 5 | Sorted by size, ascending. |
| 6 | Sorted by size, descending. |
A list of filenames if successful.
nil on error.
Command: (dos_dir)
("Blocks and Tables - Imperial.3dm" "Blocks and Tables - Imperial.bak" "Blocks and Tables - Imperial.dwg" "Blocks and Tables - Metric.3dm" "Blocks and Tables - Metric.dwg" "Blocks and Tables.dwf" "colorwh.dwg" "db_samp.3dm" "db_samp.dwg" "db_samples.mdb" "Hotel Model.dwg" "Hummer Elevation.dwg" "Lineweights.dwg" "Plot Screening and Fill Patterns.dwg" "Stadium North Elevation.dwg" "Tablet.dwg" "Taisei Detail Plan.dwg" "Taisei Door Window Sheet.dwg" "Taisei Interior Elv.dwg")
Command: (dos_dir "t*.dwg" 1)
("Tablet.dwg" "Taisei Detail Plan.dwg" "Taisei Door Window Sheet.dwg" "Taisei Interior Elv.dwg")
Command: (dos_dir "t*.dwg" 3)
("Tablet.dwg" "Taisei Detail Plan.dwg" "Taisei Door Window Sheet.dwg" "Taisei Interior Elv.dwg")
Command: (dos_dir "t*.dwg" 5)
("Taisei Door Window Sheet.dwg" "Taisei Interior Elv.dwg" "Taisei Detail Plan.dwg" "Tablet.dwg")