nago Posted June 5, 2008 Posted June 5, 2008 I would like to get a list of directories from a certain directory; and get a list of results into an array or something of that sort. At the absolute apex of convenience, it would be nice if I could only include directories in this array that contained a particular file inside of them; e.g, only the names of directories that happen to contain a readme.txt. Can someone give me a hint of where to start looking?
sandin Posted June 5, 2008 Posted June 5, 2008 (edited) #Include <File.au3> #Include <Array.au3> $inputFile = InputBox("File name", "Input file name you would like to search for", "Readme.txt") $location = fileselectfolder("select folder to search desired file name", "") $FileList=_FileListToArray($location, "*", 2) If @Error=1 Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf dim $avArray[1] for $i = 1 to $FileList[0] if FileExists($location & $FileList[$i] & "\" & $inputFile)=1 then _ArrayAdd($avArray, $FileList[$i]) Next _ArrayDisplay($avArray,"Following folders contain " & $inputFile & " file") Edited June 5, 2008 by sandin Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now