TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: ERIC SCHONNING
date: 1995-05-30 00:00:00
subject: make dir

Someone was asking about a general purpose mkdir a while back.  Here is
the code I've always used.
 
call makedir("e:\temp\j1\j1\j3")
 
sub makedir(byval ds$)
'ds$=dir string
if ds$="" then exit sub
'assuming ds$ is of the form of either
'\DIR1\DIR2
'or
'C:\DIR1\DIR2
if left$(ds$,1)="\" then st=2 else st=1
for i=st to len(ds$)
  if mid$(ds$,i,1)="\" then
    if dir$(left$(ds$,i-1),16) = "" then mkdir left$(ds$,i-1)
  end if
next i
mkdir ds$
end sub
--- QM v1.00
---------------
* Origin: Creekside Manor (805) 484-8016 CdCom Support BBS (1:206/2512.0)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.