(getfiled title default ext flags)
The getfiled function displays a dialog box containing a list of available files of a specified extension type. You can use this dialog box to browse through different drives and directories, select an existing file, or specify the name of a new file.
An integer value (a bit-coded field) that controls the behavior of the dialog box. To set more than one condition at a time, add the values together to create a flags value between 0 and 15. The following flags arguments are recognized by getfiled:
1 (bit 0) Prompt for the name of a new file to create. Do not set this bit when you prompt for the name of an existing file to open. In the latter case, if the user enters the name of a file that doesn't exist, the dialog box displays an error message at the bottom of the box.
8 (bit 3) If this bit is set and bit 0 is not set, getfiled performs a library search for the file name entered. If it finds the file and its directory in the library search path, it strips the path and returns only the file name. (It does not strip the path name if it finds that a file of the same name is in a different directory.)
16 (bit 4) If this bit is set, or if the default argument ends with a path delimiter, the argument is interpreted as a path name only. The getfiled function assumes that there is no default file name. It displays the path in the Look in: line and leaves the File name box blank.
32 (bit 5) If this bit is set and bit 0 is set (indicating that a new file is being specified), users will not be warned if they are about to overwrite an existing file. The alert box to warn users that a file of the same name already exists will not be displayed; the old file will just be replaced.
(getfiled "Select a Lisp File" "c:/program files/ <AutoCAD installation directory>/support/" "lsp" 8)