Sign in to follow this  
Followers 0
Excalibur

File Searching Algorithm

4 posts in this topic

im looking for the best possible way to make a searching algorythm that will handle *.scm kind of searches. And i want to perform searches on every drive available and in every directory.


Ooo Ëxçã¿îbúr ooO"Information Is Not Knowledge." ~Albert Einstein

Share this post


Link to post
Share on other sites



i've thought about making one, but it is alot of work(well, the only way i know how)

firs u would need to get an array of all the folder in @HomeDrive

then make an array of all the files in @HomeDrive

and then keep going deeper.... IE: @HomeDrive & $array[5], @HomeDrive & $array[3] & $array[4] and just put it in a for-loop.

lol, it probably does'nt make sense to you, but it is hard to explain.

good luck.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

AutoIt Beta required (current: 3.1.1.108)

$drive = DriveGetDrive('FIXED')
If Not @error Then
    For $i = 1 To $drive[0]
        MsgBox(0, '', _RunStdout(@ComSpec & ' /c dir /s/b "' & $drive[$i] & '\*.scm"'))
    Next
EndIf

Func _RunStdOut($_command)
    Local $data_out, $stdout = Run($_command, '', @SW_HIDE, 2)
    While 1
        $data_out &= StdOutRead($stdout)
        If @error Then ExitLoop
    WEnd
    If Not $data_out Then
        Return SetError(1, 0, '')
    Else
        Return $data_out
    EndIf
EndFunc

Edit: UDF had a issue. Added just a basic version to do the task.

Edited by MHz

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