Sign in to follow this  
Followers 0
COChOnOu

"_FileListToArray" with more than one "wildcard"

2 posts in this topic

Hello,

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



#2 ·  Posted (edited)

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

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


or...............................

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

8)

Edited by Valuater

NEWHeader1.png

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  
Followers 0