home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progbas
/
managr02.arj
/
SEEFILES.ASI
< prev
next >
Wrap
Text File
|
1991-12-15
|
3KB
|
230 lines
rem Here is the routine for viewing disk files.
b$=chr$(27)
c$=chr$(13)
d$=chr$(8)
e$=chr$(32)
a$=command$
if a$="/40" then seefil40:
seefiles:
cls
print " View Your Files"
print
print
spaces$=space$(68)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Which directory (include drive and path)? ";
wait1:
gosub continue:
if a$=b$ then
directory$=""
goto menu:
endif
if a$=c$ then doview:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(directory$)
e=d-1
directory$=mid$(directory$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
if b=0 then
a=a-1
b=79
locate a,b
print e$;
locate a,b
endif
goto wait1:
endif
print a$;
directory$=directory$+a$
goto wait1:
doview:
print ""
files$=directory$+"\*.*"
attrib=&bin00010000
filename$=find first(files$,attrib)
if error>0 then done:
print filename$
loop:
filename$=find continue
if error>0 then done:
print filename$
file=file+1
if file=20 then
print ""
print ""
print "Press any key to continue. ";
gosub continue:
file=0
print
print
endif
goto loop:
done:
print ""
print ""
print "Press any key to continue. ";
gosub continue:
file=0
directory$=""
print ""
print ""
print "Do you want to see more files? (y/n) ";
wait55:
gosub continue:
if a$="y" then seefiles:
if a$="Y" then seefiles:
if a$="n" then menu:
if a$="N" then menu:
goto wait55:
rem Here is the routine for viewing files in 40-column mode.
seefil40:
width 40
print "View Your Files"
print
print
spaces$=space$(30)
print spaces$;
color 0,7
print "Esc=Quit"
color 7,0
print "Which directory (include drive and"
print "path)? ";
wait54:
gosub continue:
if a$=b$ then
directory$=""
goto menu:
endif
if a$=c$ then doview40:
gosub cursor:
if a$=d$ then
locate a,c
print e$;
locate a,c
d=len(directory$)
e=d-1
directory$=mid$(directory$,1,e)
if e<0 then
e=0
c=c+1
locate a,c
endif
if b=0 then
a=a-1
b=38
locate a,b
print e$;
locate a,b
endif
goto wait54:
endif
print a$;
directory$=directory$+a$
goto wait54:
doview40:
print ""
files$=directory$+"\*.*"
attrib=&bin00010000
filename$=find first(files$,attrib)
if error>0 then done40:
print filename$
loop40:
filename$=find continue
if error>0 then done40:
print filename$
file=file+1
if file=20 then
print
print
print "Press any key to continue. ";
gosub continue:
file=0
print
print
endif
goto loop40:
done40:
print
print
print "Press any key to continue. ";
gosub continue:
file=0
directory$=""
print
print
print "Would you like to view more files? ";
wait10:
gosub continue:
if a$="y" then seefil40:
if a$="Y" then seefil40:
if a$="n" then menu:
if a$="N" then menu:
goto wait10:
rem This is the end of the routine for viewing files in 40-column mode.
rem Here is the routine for continuing when the user presses a key.
continue:
wait:
a$=inkey$
if a$="" then wait:
return
rem Here is the routine for fixing the cursor position.
cursor:
a=csrlin
b=pos(0)
c=b-1
return
menu:
end