get list of files in the files folder

0 favourites
  • 13 posts
From the Asset Store
Template for scrollable list, fully documented in comment and video
  • Is there any way to get a list/string of all the files a user has added in the files folder (at runtime)? If not could i request something like this be added Ashley, an array of the filenames or something would make automatic loading operations easier so users didn't have to go through a big fuss of specifying files to load if a plugin requires them for whatever purpose.

  • I'm seeking a similar answer. I want to use a list of audio files in a specific directory that's part of the project. However on export I believe all the files are pulled to a root rather than maintaining a folder structure( I believe). So being able to grab the file names during edit time by use of knowing the folder would be fantastic.

  • jayderyu Yeah Ashley said in a thread or manual i cannot remember but the Folders you make in Construct 2 is just for organizing while making the game, On export the files are put into a root!

    QuaziGNRLnose Are you talking about how it changes the file name when you import files into C2? If so yeah that would be nice to have the original filename.

  • SHG

    Yep that's what I knew. What I wanted to know is getting the file list from a folder during edit mode for use during runtime. However that was the past tense and I'm not working around that. Though heavier it's a more robust solutionl

  • SHG

    No, i'm asking if theres a way to get a list of all the files which have been imported through construct, so that i can scan for certain extensions and load them upon detection instead of forcing users to specify they want to load them, literally just a comma separated string with file-names would be sufficient.

  • No, it's not supported, but it's what the project file parameter is for.

  • No, it's not supported, but it's what the project file parameter is for.

    What is the project file parameter ? i didn't find it documented or didn't notice it when looking through preview.js.

    Some type of support for affecting the pre-loader for pre-processing work would be nice. At the moment the support for loading only audio and image leads to problems where plugins that have to do different types of loading are left to load after the game has "loaded". It'd be nice to make loading work for all plugins the way it only does or some.

  • I think he means AddFileParam("File", "Select a project file to request."); Check the Ajax plugin.

    Edit :

    I'm facing a similar problem, I want to include a folder with the dependency key in edittime.js and it only seems to work with individual files

  • That's not really at all what i need, as this still requires the user to specify a file manually, which i rather have loaded automatically.

  • Well, there no way to support it with Javascript for security reasons but node-webkit so can do everything for file system.

  • Of course it can be supported if the runtime stored a string/list of files that were added. There is no security issue here, a string to scan is all thats needed. I can load files if i know the names.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, we don't need to scan directory, just make a list of names with correct path and get each one.

  • list files from nodewebkit? with that you will get all the names inside a directory. But I dont know how to get only folder names.

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