FINDFIRST$ returns the first file in the current directory matching the file specification.
Syntax:RetStr = FINDFIRST$(FileSpec AS STRING) Return Value:
Parameters:
|
The following example will copy all the files from C:\Temp to C:\Temp\Junk.
DIM F$ F$ = FINDFIRST$("*.*") WHILE F$ > "" COPYFILE "C:\Temp\" + F$, "C:\Temp\Junk\" + F$ F$ = FINDNEXT$ WEND
The F$ = FINDFIRST$("*.*") will return the first file in the current directory, that is, the directory from which the application is being run. To enumerate the files in some other directory, either add a
CHDIR "C:\SomeOtherdirectory"
or else use
F$ = FINDFIRST$("C:\Anotherdirectory\*.*").
Returns the next file in the current directory matching the FINDFIRST$ FileSpec file specification argument.
Syntax:RetStr = FINDNEXT$ Return Value:
Parameters:
|