Function Entry: VL-DIRECTORY-FILES

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: VL-DIRECTORY-FILES

Name

vl-directory-files

Class

Visual LISP File Function

Syntax

(vl-directory-files [directory [pattern [directories]]])

Arguments and Values

  • directory — optional directory pathname; defaults to the current directory when omitted or nil.
  • pattern — optional wildcard pattern; defaults to *.*.
  • directories — optional selector:
    • -1 directories only
    • 0 files and directories
    • 1 files only

Description

Lists files in a directory, optionally filtered by pattern and directory/file selection.

Return Values

List of strings or nil.

Autodesk documents that only the matching names are returned, not full pathnames.

Side Effects

None.

Compatibility

Part of the Visual LISP extension layer, but documented as broadly available across Autodesk desktop and web platforms.

Availability

  • AutoCAD 2026: documented (per Autodesk reference page).
  • AutoCAD 2022, BricsCAD V25 and V26: the directories selector was verified by runtime probe 2026-08-09 — -1 returns directories only and 1 returns files only on every engine, matching the Autodesk signature above.
  • Status: verified on both vendors (no longer "presumed compatible").

Source Notes

Notes

  • Autodesk documents a Unicode/LISPSYS behavior change in AutoCAD 2021.