Recursive listing of files in a listbox?

This forum is currently in read-only mode.
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • 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.

    Cheers,

    Sponge.

  • File object expressions would do the job.

  • And there it was!

    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.

    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?

    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.

    Looking forward to the next version.

    Sponge.

    EDIT: There was one other thing that I meant to ask:

    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.

    I'll stop asking questions now.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • Lol, you know, I did look for a filter command.

    Can't see the wood for the trees.

    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.

  • The CPU work will be nothing whichever way you use, generally, so I wouldn't worry about it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)