' ---------------------------------------------
' Directory maintenance
' ---------------------------------------------
cr$ = chr$(13)
dirOf$ = "c:\*.*" ' get directory of
' -------------------------------------------
' Shell out directory
' -------------------------------------------
[dirShell]
cls
html "
"
loc$ = strRep$(dirOf$,"*.*","")
x$ = shell$("dir ";dirOf$)
i = 1
while word$(x$,i,cr$) <> ""
a$ = word$(x$,i,cr$)
if trim$(a$) = "" then goto [next]
if left$(a$,1) = " " then goto [next]
if left$(a$,1) = cr$ then goto [next]
type$ = mid$(a$,26,3)
size$ = mid$(a$,30,9)
size$ = strRep$(size$,",","")
size = val(size$)
if type$ <> "DIR" and size = 0 then goto [next]
name$ = mid$(a$,40)
a$ = strRep$(a$,"<","[")
a$ = strRep$(a$,">","]")
html left$(a$,39)
link #ddir,name$, [doDir]
#ddir setkey(type$;"|";loc$;name$)
html "
"
goto [next1]
[next]
print a$
[next1]
i = i + 1
wend
wait
[doDir]
type$ = word$(EventKey$,1,"|")
name$ = word$(EventKey$,2,"|")
if type$ = "DIR" then
dirOf$ = name$;"\*.*"
goto [dirShell]
end if
html ""
wait
[delete]
kill name$
goto [dirShell]
[view]
nname$ = strRep$(name$,"\","/")
print "File:";nname$
nname$ = mid$(nname$,3)
html "