cardguy1000 Posted May 30, 2005 Posted May 30, 2005 Hey guys, I'm trying to make a script that I can place in a root directory and it will then compile all .au3's within its containing directory as well as all the directories below it. I've figured out how to do the current directory quite easily, but not sure how I'd handle searching sub directories as the function does not do this as it seems, then how I'd get the file path to those files returned??? Here's What I have so far for compiling all the au3's within the scripts directory. ;Gets the install directory of AutoIt $installDir = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') ; Shows the filenames of all files in the current directory, note that "." and ".." are returned. $search = FileFindFirstFile("*.au3") ; Check if the search was successful If $search = -1 Then MsgBox(0, "Error", "No .au3 files found in this directory") Exit EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop Run($installDir & '\Aut2Exe\Aut2Exe.exe /in ' & @ScriptDir & '\' & $file & ' /out ' & @ScriptDir & '\' & stringreplace($file, '.au3', '.exe')) WEnd ; Close the search handle FileClose($search)
ezzetabi Posted May 31, 2005 Posted May 31, 2005 Search the folder with this function, it will return an array of filenames (including subfolders):http://www.autoitscript.com/forum/index.php?showtopic=5458Apply the action of compiling on the all filenames stored in the array...
Alandor Posted May 31, 2005 Posted May 31, 2005 only one thing, I think this kind of post should be posted on the support forum not in the script forum. You are asking for support, not releasing any kind of UDF or usefull script.
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