QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: hanness on September 03, 2020, 07:03:28 pm

Title: What is a good way of parsing a list of files in a folder?
Post by: hanness on September 03, 2020, 07:03:28 pm
Let's say that I have a folder called C:\MyFolder. Inside that folder I have a bunch of files (no sub directories are present).

I want to perform an action on each file in this folder.

What is a good way for me to get a list of all files and then act on them one by one?

Right now I'm doing something that just feels more convoluted than it needs to be.

I'm getting a list of files and redirecting that output to a text file. Then I open the text file and read line by line into a string array to get a list of files.

Is there not some more direct way to populate an array with the names of all the files in a folder?
Title: Re: What is a good way of parsing a list of files in a folder?
Post by: bplus on September 03, 2020, 07:41:55 pm
See here: https://www.qb64.org/forum/index.php?topic=1511.msg122368#msg122368
Title: Re: What is a good way of parsing a list of files in a folder?
Post by: hanness on September 03, 2020, 08:42:27 pm
Thanks! Much appreciated.