Sahar Posted July 14, 2016 Share Posted July 14, 2016 I need a script or batch file to compile bunch of *.au3 in a folder and recieve *.exe in that folder, would you please help me about that? Link to comment Share on other sites More sharing options...
SadBunny Posted July 14, 2016 Share Posted July 14, 2016 In your directory with autoit scripts, use the following commandline (modify path and anything else you want to change of course): for /f %f in ('dir /b *.au3') do f:\dev\AutoIt3\Aut2Exe\Aut2exe.exe /in %f Something like that? (Double the % signs if you run that from a batch file.) Sahar 1 Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
pranaynanda Posted July 14, 2016 Share Posted July 14, 2016 (edited) Create an array of files in the folder and then pass them through Aut2Exe as parameters this way: Run("Aut2Exe.exe /in <filename.au3>") This will create executable of all files in that folder. Edited July 14, 2016 by pranaynanda Link to comment Share on other sites More sharing options...
Sahar Posted July 15, 2016 Author Share Posted July 15, 2016 (edited) I've tried these 2 in batch files : setlocal enableextensions disabledelayedexpansion for %%a in ("C:\Test\*.au3") do ( C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe.exe /in "%%~fa" /out "%%~dpna.exe" ) AND for /f %%f in ('C:\Test\*.au3') do C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe.exe /in %%f non of them worked I'm not good at batch files so I cannot find the reason of failure, I would be thankful if you help me... Also how can I do it via command line? Edited July 15, 2016 by Sahar Link to comment Share on other sites More sharing options...
SadBunny Posted July 15, 2016 Share Posted July 15, 2016 First, try quoting that path that contains spaces. (I tend to avoid spaces in my path so I don't have to worry much about quotes ) Second, what I gave you was (or should be) runnable from the command line. I tested it and it works fine for me Just use single percent signs from commandline and double percent signs if you put that command in a batchfile. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
Sahar Posted July 15, 2016 Author Share Posted July 15, 2016 woww...It's working, after putting Aut2exe.exe in script's folder the problem got solved Link to comment Share on other sites More sharing options...
SadBunny Posted July 15, 2016 Share Posted July 15, 2016 Well ok, but it shouldn't be necessary to do that. Oh well, if that's good enough then fine Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
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