BCX Console Demonstration Program S67.bas

 DIM A$
 
 CLS
 
 IF COMMAND$ = "" THEN
   A$ = FINDFIRST$("*.*")
 ELSE
   A$ = FINDFIRST$(COMMAND$)
 END IF
 
 WHILE A$ <> ""
   ShowFiles (A$)
   A$ = FINDNEXT$
 WEND
 
 SUB ShowFiles (A$)
   LOCAL T1$
 
   T1$ = ""
 
   IF GETATTR(A$) = 32 THEN
     T1$ = "[" & A$ & "]"
   ELSE
     T1$ = A$
   END IF
 
   PRINT T1$
 
 END SUB