Jump to content
Sign in to follow this  
vickerps

Search Function which searches all sub folders

Recommended Posts

vickerps

Hi

Can anyone tell me how to perform a search for a particular file type. What i want to do is create a list of all *.gho file that exist on a drive.

Share this post


Link to post
Share on other sites
vickerps

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

Share this post


Link to post
Share on other sites
99ojo

Hi,

perform search function of forum with:

file recursive type

There are loads of examples you can start coding with.

If you have further problems, come back.

;-))

Stefan

Share this post


Link to post
Share on other sites
FaT3oYCG

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.

Share this post


Link to post
Share on other sites
Xenobiologist

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

Share this post


Link to post
Share on other sites
zodiac

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,

Share this post


Link to post
Share on other sites
Yashied

#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

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.