How to (vl-mkdir "folderpath\\folder") and make it 'visible' in Explorer

How to (vl-mkdir "folderpath\\folder") and make it 'visible' in Explorer

ec-cad
Collaborator Collaborator
733 Views
7 Replies
Message 1 of 8

How to (vl-mkdir "folderpath\\folder") and make it 'visible' in Explorer

ec-cad
Collaborator
Collaborator

I noticed when I do :

(defun save_the_dxf ( fname )
(setq FOLDER (strcat DXF_Path_Name "Finished"))
(vl-mkdir FOLDER); Nil if folder exists
(setq OUTPATH (strcat FOLDER "\\"))
(setq dxfname (strcat OUTPATH out_fil))
(command "_DXFOUT" dxfname 16)
); end function save_the_dxf

 

It (does) make the Folder, but it is not 'visible', marks it 'read-only' ?

Anybody know why that happens ?

 

ECCAD

 

 

 

I

0 Likes
Accepted solutions (1)
734 Views
7 Replies
Replies (7)
Message 2 of 8

paullimapa
Mentor
Mentor

Is DXF_Path_Name referring to your local path or network path?  Perhaps try locally first to confirm that it works. 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 8

ec-cad
Collaborator
Collaborator

It refers to a 'local' folder on C: drive. I just tried it again, after deleting the \Finished folder,

Shows up now ?

 

ECCAD

0 Likes
Message 4 of 8

paullimapa
Mentor
Mentor
Accepted solution

I don't encounter that problem when I make a folder called "Finished" under existing Autodesk folder in my C: drive:

paullimapa_0-1724527155877.png

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 5 of 8

ec-cad
Collaborator
Collaborator

@paullimapa 

I find that I can see the Folder, but it is marked 'Read-Only' when I check the Properties.

Must be a way to set that to the old DOS days, attrib 7,7,7 which is read/write/execute.

Going on to more pressing issues.

Thanks for your responses.

 

ECCAD

 

0 Likes
Message 6 of 8

Sea-Haven
Mentor
Mentor

Just a comment do something similar.

 

; make temp directory
(if (vl-file-directory-p "C:\\Acadtemp\\")
(Princ "Acadtemp exists")
(vl-mkdir "C:\\AcadTEMP\\")
)

another

; check that pdf directory exists
(setq dwgpre (strcat (getvar "dwgprefix") "\pdf"))
(if (= (vl-file-directory-p dwgpre) nil)
(vl-mkdir dwgpre)
)

 

0 Likes
Message 7 of 8

ec-cad
Collaborator
Collaborator

The (vl-mkdir "drive:\\path") just nil's if that Folder exists. No need to 'check' for it.

 

My issue seems to be the 'Attributes' of the Folder and files are 'read-only' by default.

And I cannot seem to convince Windows to 'not' DO that, just output both Folder & Files

without that 'read-only' bit set.. Just a BIG BOTHER.

 

ECCAD

0 Likes
Message 8 of 8

Sea-Haven
Mentor
Mentor

Bit strange never had a problem, 8 pc's, the IT was all over us but we did have permissions to make directories etc. It may be something to do with the desired location. We only did below an existing dwg path it was located on a server under a project number. Works on my C: & 😧 drives. 

0 Likes