Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to create a directory with vlisp?

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
193 Views, 6 Replies

How to create a directory with vlisp?

Hi Everyone, I've found all kinds of file handling functions in the vlisp documentation but I don't see any directory handling functions Is it possible to check for and/or create a directory from lisp? Can anyone provide a sample of how this is done if it is possible? Thanks in advance. Gary
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

Gary (vl-mkdir "YourFolderPath") Steve "Gary McMaster" wrote in message news:3fe1a95f$1_2@statler... > Hi Everyone, > > I've found all kinds of file handling functions in the vlisp documentation > but I don't see any directory handling functions > Is it possible to check for and/or create a directory from lisp? Can anyone > provide a sample of how this is done if it is possible? > > Thanks in advance. > > Gary > >
Message 3 of 7
Anonymous
in reply to: Anonymous

Thanks very much Steve. I thought I had seen a way to handle dirs in the Acad2000 docs. Would it be (vl-chkdir "YourFolderPath") to see if it already exists? Gary
Message 4 of 7
Anonymous
in reply to: Anonymous

Gary, Use (filefind), example below (if (not (findfile "YourFolderPath")) (vl-mkdir "YourFolderPath") (alert "Folder exists") ) Steve "Gary McMaster" wrote in message news:3fe1ac32$1_6@statler... > Thanks very much Steve. > > I thought I had seen a way to handle dirs in the Acad2000 docs. > > Would it be (vl-chkdir "YourFolderPath") to see if it already exists? > > Gary > >
Message 5 of 7
Anonymous
in reply to: Anonymous

That should be use (findfile)... "Steve Jones" wrote in message news:3fe1ad83$1_2@statler... > Gary, > > Use (filefind), example below > > (if > (not (findfile "YourFolderPath")) > (vl-mkdir "YourFolderPath") > (alert "Folder exists") > ) > > Steve > > "Gary McMaster" wrote in message > news:3fe1ac32$1_6@statler... > > Thanks very much Steve. > > > > I thought I had seen a way to handle dirs in the Acad2000 docs. > > > > Would it be (vl-chkdir "YourFolderPath") to see if it already exists? > > > > Gary > > > > > >
Message 6 of 7
Anonymous
in reply to: Anonymous

Steve, Thanks again. I'm familiar with findfile but never thought of using it to find a directory. Probably because I've never created a directory with lisp:) Gary
Message 7 of 7
Anonymous
in reply to: Anonymous

You could use vl-file-directory-p -- -Jason Member of the Autodesk Discussion Forum Moderator Program "Gary McMaster" wrote in message news:3fe1ac32$1_6@statler... > Would it be (vl-chkdir "YourFolderPath") to see if it already exists?

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

Post to forums  

Autodesk Design & Make Report

”Boost