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 = INVALID_HANDLE_VALUE;
! BOOL found = TRUE;
! FileHandle = FindFirstFile(b, &FindData);
! printf("% zd\n", (size_t)FileHandle);
! if (FileHandle == INVALID_HANDLE_VALUE)
!  {
!   found = FALSE;
!  }
! while (found != FALSE)
! {
!  printf("%s\n",FindData.cFileName);
!  found = FindNextFile(FileHandle, &FindData);
! }
! FindClose(FileHandle);

 END SUB

Result:


 Result not displayed for this example.