Searches the AutoCAD library path for the specified file or directory
(findfile filename)
findfile function makes no assumption about the file type or extension of filename. If filename does not specify a drive/directory prefix, findfile searches the AutoCAD library path. If a drive/directory prefix is supplied, findfile looks only in that directory.
TheArguments
Name of the file or directory to be searched for.
Return Values
nil, if the specified file or directory is not found.
A string containing the fully qualified file name; otherwisefindfile is suitable for use with the open function.
The file name returned byExamples
If the current directory is / AutoCAD 2005 and it contains the file abc.lsp, the following function call retrieves the path name:
Command: (findfile "abc.lsp")
"C:\\Program Files\\ AutoCAD 2005\\abc.lsp"
If you are editing a drawing in the / AutoCAD 2005/drawings directory, and the ACAD environment variable is set to / AutoCAD 2005/support, and the file xyz.txt exists only in the / AutoCAD 2005/support directory, then the following command retrieves the path name:
Command: (findfile "xyz.txt")
"C:\\Program Files\\ AutoCAD 2005\\support\\xyz.txt"
findfile returns nil:
If the file nosuch is not present in any of the directories on the library search path,Command: (findfile "nosuch")
nil