|
FirstFile$ | ||
File$ = FirstFile$(Folder$) | ||
Parameters: Folder$ = The name of the folder you wish to read the file / folder names from |
||
Returns: File$ = The name of the first file or folder name in this folder |
||
The FirstFile$ function will return the first file or folder name linked in folder. The function will return a null (empty) string if there were no more files or folders in the requested folder. After reading the first file, you need to use "" to read any following files. FACTS: * FirstFile$ sets the internal FirstFile$() path, which NextFile$() will also use. * 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. Example #1: This example lists the files and folders on your C: drive
Example #2: This example reads the files + folders in an array to a string array.
|
Related Info: | FileSize | FileType | NextFile$ | OpenFile | ReadDir : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |