home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD 60 / supercd60_2.iso / BlitzBasic / Blitz2DPCP / data1.cab / Support / help / samples / readdir.bb < prev    next >
Encoding:
Text File  |  2001-11-21  |  301 b   |  17 lines

  1.  
  2. dir=ReadDir( CurrentDir$() )
  3. Print "Directory of "+CurrentDir$()
  4. Repeat
  5.     f$=NextFile$( dir )
  6.     If f$="" Then Exit
  7.     t=FileType( f$ )
  8.     f$=LSet$( f$,32 )
  9.     If t=1            ;it's a file!
  10.         Print f$+" ("+FileSize( f$ )+")"
  11.     Else If t=2    ;it's a dir!
  12.         Print f$+" (DIR)"
  13.     EndIf
  14. Forever
  15. CloseDir dir
  16.  
  17.