Recursive listing of files in a listbox?

For questions about using Classic.

Post » Wed Apr 15, 2009 3:28 pm

Does Construct have all the necessary parts required to search a given directory for file-types recursively, and list the contents in a list box?

So, for instance, I use the given path "C:\data\files\" and I want to search for all files that end with ".txt", and list all found files in a listbox.

It's easy to do in C++ or VB.Net for instance, but I'd just like to know if all the required pieces are currently in Construct.

BTW, I should have time this weekend to finish the second Maze Tutorial, which not only shows how to optimise the maze creation, but also includes a couple of examples of what you can do with that data. :wink:

Cheers,
Sponge.
B
2
S
1
G
3
Posts: 105
Reputation: 1,310

Post » Wed Apr 15, 2009 3:34 pm

File object expressions would do the job.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Wed Apr 15, 2009 10:25 pm

And there it was! :D
Thanks.

Works perfectly, except I can't see a way of setting a filter for the FileListRecursive function so that it only lists the files with the extension I'm looking for.
I could do this manually, but it sort of defeats the purpose of the function.

While I'm here, could you possibly answer a couple of questions that I've meant to ask many times, but always seem to forget when I log on here.

[color=#0040BF:19luk6cd]Is there an equivalent to the MMF "Paste into Background" in Construct?

Is it possible to run another program silently via command-line using construct, and have the construct app pause and wait for the run program to exit before continuing?[/color:19luk6cd]

BTW, I've just noticed that the "Version Info" object uses the same description as the "Binary" object.
I guess it was used as a template when creating it. :D

Looking forward to the next version.
Sponge.

EDIT: There was one other thing that I meant to ask:
[color=#000080:19luk6cd]Which part of Construct (in a DirectX app) is causing ZoneAlarm to say "Temp.exe is attempting to monitor user activities...etc"?
It has no adverse effects when denied, and only asks when it's a DirectX app.[/color:19luk6cd]

I'll stop asking questions now. :lol:
B
2
S
1
G
3
Posts: 105
Reputation: 1,310

Post » Thu Apr 16, 2009 10:16 am

FileListFiltered can get files with a given extension.

I'm not sure what you mean with background layers but there isn't a concept of backgrounds in Direct-X - and thus Construct - as everything is redrawn every frame.

Running applications silently would have to be implemented via a plugin as I don't remember any way to do it currently.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Thu Apr 16, 2009 11:20 pm

Lol, you know, I did look for a filter command.
Can't see the wood for the trees. :D

Works fine.

Thanks for the other answers.
What I was referring to concerning backgrounds was the least CPU intensive way of adding sprites to the background.
I think I have a way now.

Cheers,
Sponge.
B
2
S
1
G
3
Posts: 105
Reputation: 1,310

Post » Fri Apr 17, 2009 12:20 am

The CPU work will be nothing whichever way you use, generally, so I wouldn't worry about it.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests