Scan a folder for all music files and add them to a list

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hello.

    My user has the option to add a directory with his own music files. So he can select a folder, then all files found in that folder + subfolders should be added to a list, which will play the music..

    How to do this?

    2xD.

  • Use the file-folder object > start a folder/file browsing loop > ON Loop: Add Line to List (Filename)

    then when User-Double Clicks list: Play MP3 with DirectShow object (filename: current selected (list))

    Game Launcher Creator V3 - Please login to see this link.
    Bespoke Software Development - Please login to see this link.
    Learn Clickteam Fusion 2.5 - Please login to see this link.

    Danny // Clickteam

  • After the above operation, you can then run another fast loop checking for the extension of each line like so:

    Fastloop("ScanList") (Nr of Lines Times):

    +On Loop Scanlist:

    +(List.Number(Fastloop.index)) <> Right$(".mp3", 4): Delete (List.line)

    Game Launcher Creator V3 - Please login to see this link.
    Bespoke Software Development - Please login to see this link.
    Learn Clickteam Fusion 2.5 - Please login to see this link.

    Danny // Clickteam

  • After the above operation, you can then run another fast loop checking for the extension of each line like so:

    Fastloop("ScanList") (Nr of Lines Times):

    +On Loop Scanlist:

    +(List.Number(Fastloop.index)) <> Right$(".mp3", 4): Delete (List.line)

    Sorry to dig up this thread, but I'm doing something similar except using .xml files.

    I was able to list all the files in the folders and subfolders with the "FileFolder Object" extension. But I didn't understand how to use "FastLoop" to delete all non-.xml files from the list.

    can anybody help me?

  • Just use List object Load filelist action, type a path followed by *.xml (or whatever filetype you need)

    The List Object Load filelist action does not search in subfolders :(.

    I am dealing with the following situation:

    MainFolder\Folder1\file.xml
    MainFolder\Folder1\file1.dat
    MainFolder\Folder1\file2.dat
    MainFolder\Folder1\file3.dat
    MainFolder\Folder2\file.xml
    MainFolder\Folder2\file1.dat
    MainFolder\Folder2\file2.dat
    MainFolder\Folder2\file3.dat
    MainFolder\Folder3\file.xml
    MainFolder\Folder3\file1.dat
    MainFolder\Folder3\file2.dat
    MainFolder\Folder3\file3.dat.
    ....

    as I said, I can list all the files inside the main folder and in the subfolders. Now I want to list only the *.xml files.


    Ps.: legal encontrar um brasileiro por aqui :)

  • Unfortunately the folder names are not sequential. They are random.

    And the XML files won't always be in the first subfolder either.


    ----------------------------------------------------------------------

    EDIT:

    SOLUTION:

    I found a workaround.

    I used the "String Parse 2 Object" in the fast loop for each line of the "list object". All that had "XML" as the last "string" (I used "." as delimiter") was added as a newline and another "list Object".

    Well, it will work for what I need!

    Thanks!

    Edited once, last by fusion (February 21, 2023 at 9:53 PM).

  • Please login to see this link.

    Use my extension.
    Load file list will load recursively, and you can get the number of files and file at ID by expressions.
    Then you can check each file by a fastloop then compare the extension name.

    I was making a GUI batch encryption tool years ago, that's why I made this. (and end up to making the CLI version to use it in batch files, and avoid the Fusion memory limit. )

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!