Jump to content
Sign in to follow this  
DarkFox

please some help in search a file format

Recommended Posts

DarkFox

i want a script that can help me in finding files with such format..

for example,i want search all mp3 files in my hard disk,how can i do that

i am trying FileFindFirstFile and FileFindNextFile but i notice that it can't find all files everywhere.

thank you

Share this post


Link to post
Share on other sites
Yashied

#Include <File.au3>

_FindFiles('C:', '*.mp3')

Func _FindFiles($sRoot, $sFile)

    Local $FileList

    $FileList = _FileListToArray($sRoot, $sFile, 1)
    If Not @error Then
        For $i = 1 To $FileList[0]
            ConsoleWrite($sRoot & '\' & $FileList[$i] & @CR)
        Next
    EndIf
    $FileList = _FileListToArray($sRoot, '*', 2)
    If Not @error Then
        For $i = 1 To $FileList[0]
            _FindFiles($sRoot & '\' & $FileList[$i], $sFile)
        Next
    EndIf
EndFunc   ;==>_FindFiles

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.