Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 4
Anonymous
110 Views, 3 Replies

AutoLisp

How to make a list of existing file names in specified directory? I dont need standard AutoCAD file dialog box (GETFILED). For eample there are files: data1.txt, data2.txt, ... dataN.txt in directory .../Data/ How to filter files and get a list: ("data1.txt" "data2.txt" ... "dataN.txt")? Please any sugestions...
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

if you have acad2***

Then
(vl-directory-files" path" "ext" )
if all files simpli put ext "*.*"
Message 3 of 4
Anonymous
in reply to: Anonymous

Thanks "agruno"! It works great.
Message 4 of 4
Anonymous
in reply to: Anonymous

Use the old MS-DOS: (command "shell" "dir *.txt /b >file.lst") This will make a file called file.lst with all txt files. You can open this file and read all filenames. Be carefull: I don't know what will happen if there are spaces in the used path like: (command "shell" "dir c:\program files\autocad 2004\support\*.pat /b >file.lst") JanC "naujoke" schreef in bericht news:4035d1a3$1_1@newsprd01... > How to make a list of existing file names in specified directory? > I dont need standard AutoCAD file dialog box (GETFILED). > > For eample there are files: data1.txt, data2.txt, ... dataN.txt in > directory .../Data/ > > How to filter files and get a list: ("data1.txt" "data2.txt" ... > "dataN.txt")? > > Please any sugestions... > >

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost