3
« on: October 26, 2020, 07:57:01 pm »
I am back again. While the "pipecom.h" library provides a solution, it captures all the file names in the folder meeting the specified criterion. Having a folder with hundreds of files will require creating a huge string array to store all the file names in the program.
The original code using DIR$ function of BASIC fetches only one name at a time, which is a more elegant solution.
I wonder if the "while (!feof(stream))" statement be pulled out of the library so that it provides only one file name at a time and returns a nul when all the files are covered.
Thanks
F$=DIR$("*.LL1")
DO WHILE F$ <> ""
CNT$ = LEFT$(F$, 4)
OPEN CNT$ + ".LL1" FOR INPUT AS #1
OPEN CNT$ + ".LL" FOR OUTPUT AS #2
F$ = DIR$
LOOP