NextFile$
File$ = NextFile$()
 
Parameters: NONE
Returns:

    File$ = The name of the next file or folder name in this folder
 

      The NextFile$ function will return the next file or folder name from the current folder. The function will return a null string if there were no more files or folders in the requested folder.



FACTS:


      * NextFile$ uses the Current read Folder$ that was initialized with FirstFile$() function previously.

      * Files listed with the FirstFile$,NextFile$ functions, will be listed in the order windows has internally linked them. This order will normally appear random. If you want them to be displayed in (alphabetic) order, use the ReadDir functions.




Mini Tutorial:


      This example lists the files and folders on your C: drive


  
  
; Set the current dir to the C drive
  CD "c:"
  
; Get the first file from the c drive
  File$=FirstFile$("c:")
  
; While File$ is not equal too nothing, then
; run the while loop
  While File$<>""
   ; Display the File$ or folder name
     Print file$
     
   ; Get the next file from this folder
     File$=NextFile$()
     
   ; Just back to the while statement
  EndWhile
  
; Display the screen and wait for key press
  Sync
  WaitKey
  



 
Related Info: FirstFile$ | ReadDir :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com