Jump to content
Sign in to follow this  

"_FileListToArray" with more than one "wildcard"

Recommended Posts



I use "_FileListToArray" function to check if a folder contains files with a given extension ("*.mp3")

but finally, i want to check if the folder contains audio files ("*.mp3|*.wma|*.wav|*.ogg ...)

i'm sure there is a better way than to use a function per extension on each folder no ? so i can't find this way :P

So ... if you can help me ....

Share this post

Link to post
Share on other sites

use file list to arraywith "*.*" then...

$file_list = stringright($array_of_files, 4)
if $file_list = ".mp3" or $file_list = ".wav" or.....


if StringInStr($file_list, ".mp3") Or StringInStr($file_list, ".wav") Or StringInStr($file_list, ".wma") Then
; do what you want


Edited by Valuater


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.