Skip to content

dos_getfiled

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Displays a resizing Windows common file open dialog box that allows for single file selection.

Syntax

(dos_getfiled title path filter)

Parameters

title

A string containing the dialog box title.

path

A string identifying an existing directory.

filter

A filename filter string. The filter string consists of two components: a description (for example, "Text Files"), and a filter pattern (for example, ".TXT"). Multiple filter patterns can be specified for a single item by separating the filter-pattern strings with a semicolon (for example, ".TXT;.DOC;.BAK"). The components must be separated by a pipe character ("|"). The filename filter string can consist of one or more filter strings, each separated by a pipe character ("|"). The entire string must be terminated with two pipe characters ("||").

Returns

A qualified path to the selected file.

nil on cancel or on error.

Example

Command: (dos_getfiled "Select a file" "C:\\Program Files\\Autocad 2010\\" "Drawing files (*.dwg)|*.dwg|All files (*.*)|*.*||")
"C:\\Program Files\\AutoCAD 2010\\Sample\\A-01.dwg"

Clone this wiki locally