[erlang-questions] Shell - compile multiple files with ERLC in Windows

Antonio Fernández <>
Thu Jan 27 22:21:28 CET 2011

Hi Robert !

I tried you solution but didn´t works :

*FOR %%f in (src\*.erl) DO erlc -W -o ebin "%%f"*

It works after a little fix ...

*J:\erlang>FOR %f in (src\*.erl) DO erlc -W -o ebin "%f"*
J:\erlang>erlc -W -o ebin "src\hello.erl"
J:\erlang>erlc -W -o ebin "src\hello2.erl"

I´m running Erlang over Windows7 home-premium .....

Thanks & nice weekend :D


Antonio Miguel Fernández Rodríguez
Jaraxa Software, SL

El 27/01/2011 20:32, Robert Virding escribió:
> The reason you need to do this in Windows is that in Linux the shell automatically expands src/*.erl to the names of all the files which match, i.e. all .erl files in src, while the Windows shell does not do this. There in Windows either the application has to do itself, which erlang doesn't, or you need to write an explicit loop which does the expansion as Roberto has done.
> Robert
> ----- "Roberto Ostinelli"<>  wrote:
>>> try:
>>> FOR %%f in (src\*.erl) DO erlc -W %command% -o ebin "%%f"
>>> r.
>> sorry for that, obviously %command% is a paste error. this should do
>> it:
>> FOR %%f in (src\*.erl) DO erlc -W -o ebin "%%f"
> --
> Robert Virding, Erlang Solutions Ltd.
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:

More information about the erlang-questions mailing list