BCX Console Demonstration Program s48.bas

 DIM A$
 
 A$ = COMMAND$
 IF A$ = "" THEN A$ = "*.*"
 ShowDir(A$)
 
 SUB ShowDir(b$)
 ! WIN32_FIND_DATA FindData;
 ! HANDLE FileHandle;
 ! int found;
 ! FileHandle = FindFirstFile(b, &FindData);
 ! found = (int)FileHandle;
 ! while (found != 0)
 ! {
 !  printf("%s\n",FindData.cFileName);
 !  found = FindNextFile(FileHandle, &FindData);
 ! }
 ! FindClose(FileHandle);
 END SUB