How to create a directory by lisp line?

George_rsg

Usenet Archive
Joined
Jan 7, 2004
Messages
1
Reaction score
0
I want to add a line to my lisp route which can create a file directory, e.g. "c:\temp\". Pleas help!

THX!
 
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
 
in addition to Bob's suggestion, there is also:

(vl-mkdir "c:\\temp")
 
if you DONT have doslib you can...

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

Jaime
 
Vlisp also has the undocumented vl-mkdir function

(vl-mkdir "c:/temp")

Steve
 
in the help file :o)), 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
 
Yeah, it made it into the A2k4 docs.

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

| in the help file :o)), 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
| *********************************************
|
|
|
 

Latest threads

Back
Top