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

Robert Virding <>
Thu Jan 27 20:32:16 CET 2011

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.


----- "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.

More information about the erlang-questions mailing list