How to create a directory by lisp line?

Discussion in 'AutoCAD' started by George_rsg, Jan 7, 2004.

  1. George_rsg

    George_rsg Guest

    I want to add a line to my lisp route which can create a file directory, e.g. "c:\temp\". Pleas help!

    THX!
     
    George_rsg, Jan 7, 2004
    #1
  2. George_rsg

    ECCAD Guest

    Do you have the DOS Lib .arx loaded? If so, you can
    do:
    (setq mydir "C:\\temp")
    (dos_mkdir mydir)
    doslib available from McNeal & Assoc.
    Web search for 'DOSLIB' should get you there.

    Bob
     
    ECCAD, Jan 7, 2004
    #2
  3. George_rsg

    ECCAD Guest

    ECCAD, Jan 7, 2004
    #3
  4. George_rsg

    Mark Propst Guest

    in addition to Bob's suggestion, there is also:

    (vl-mkdir "c:\\temp")
     
    Mark Propst, Jan 7, 2004
    #4
  5. George_rsg

    Jaime Guest

    if you DONT have doslib you can...

    (command "shell" "md C:\newDir")

    Jaime
     
    Jaime, Jan 7, 2004
    #5
  6. George_rsg

    Steve Jones Guest

    Vlisp also has the undocumented vl-mkdir function

    (vl-mkdir "c:/temp")

    Steve
     
    Steve Jones, Jan 7, 2004
    #6
  7. George_rsg

    Jim Claypool Guest

    (vl-mkdir "Directory name")
     
    Jim Claypool, Jan 7, 2004
    #7
  8. Luis Esquivel, Jan 7, 2004
    #8
  9. George_rsg

    BTO Guest

    in the help file :eek:)), vl-mkdir is documented
    Bruno Toniutti

    *******************************************
    vl-mkdir Function

    Creates a directory

    (vl-mkdir directoryname)

    Arguments

    directoryname

    The name of the directory you want to create.

    Return Values

    T if successful, nil if the directory exists or if unsuccessful.

    Examples

    Create a directory named mydirectory:

    _$ (vl-mkdir "c:\\mydirectory")
    T
    *********************************************
     
    BTO, Jan 8, 2004
    #9
  10. Yeah, it made it into the A2k4 docs.


    --
    R. Robert Bell, MCSE
    www.AcadX.com


    | in the help file :eek:)), vl-mkdir is documented
    | Bruno Toniutti
    |
    | *******************************************
    | vl-mkdir Function
    |
    | Creates a directory
    |
    | (vl-mkdir directoryname)
    |
    | Arguments
    |
    | directoryname
    |
    | The name of the directory you want to create.
    |
    | Return Values
    |
    | T if successful, nil if the directory exists or if unsuccessful.
    |
    | Examples
    |
    | Create a directory named mydirectory:
    |
    | _$ (vl-mkdir "c:\\mydirectory")
    | T
    | *********************************************
    |
    |
    |
     
    R. Robert Bell, Jan 8, 2004
    #10
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.