Jump to content

Search Function which searches all sub folders


Recommended Posts

Sorry forgot to mention that I can do this by using a simple windows prompt command:

dir /s *.gho >c:\results.txt

This work great and does exactly what I want (However the it list the info it to complex).

All i want is a simple list that like:

c:\example1.gho

c:\example2.gho

c:\subfolder1\example3.gho

c:\subfolder2\example4.gho

Link to comment
Share on other sites

I have personally posted some information that would help to solve this problem on a previous occasion, if you search through my posts im sure you could find the thread.

EDIT: This thread: http://www.autoitscript.com/forum/index.php?showtopic=86695&st=0&p=621662&hl=lua%20recursive&fromsearch=1&#entry621662

Edited by FaT3oYCG

Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right.

Link to comment
Share on other sites

The normal dir command in DOS could also help you.

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

  • 2 weeks later...

Sorry forgot to mention that I can do this by using a simple windows prompt command:

dir /s *.gho >c:\results.txt

This work great and does exactly what I want (However the it list the info it to complex).

All i want is a simple list that like:

c:\example1.gho

c:\example2.gho

c:\subfolder1\example3.gho

c:\subfolder2\example4.gho

dir c:\*.gho /s /b > c:\results.txt

This does exactly what you want.

Cheers,

Link to comment
Share on other sites

#Include <File.au3>

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

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

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...