Jump to content

File Searching Algorithm


 Share

Recommended Posts

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
Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...