Hi all,
Is there a possibility to create a batch file in dos to be able to recompile any number of files and create executables?
Thanks in advance
Manuele
Yes it is possible, since Metaeditor64.exe can be called with its parameters...
Give it a try...
Here it is a snippet example from my Batch compiling process written in Powershell:
#fires up the Metaeditor compiler... & "C:\Program Files\ModalMais MT5 DEV\metaeditor64.exe" /compile:"$FileToCompile" /log:"$LogFile" /inc:"C:\Users\xxx\AppData\Roaming\MetaQuotes\Terminal\FA9A5FBBE1355744563\MQL5" | Out-Null
Thank you, great!
This batch can use file names containing spaces.
I'm using this batch file for compile more files:
@echo off
set metaeditor="C:\Program Files\MetaTrader 5\metaeditor64.exe"
set include_path="C:\Users\Manuele\AppData\Roaming\MetaQuotes\Terminal\XXXXXX\MQL5"
set file_path=C:\Users\Manuele\AppData\Roaming\MetaQuotes\Terminal\XXXXXX\MQL5\Experts\Prg\
rem -- files to compile:
set file_name=LIA MM Valuta W1 V040.mq5
set file_log=LIA MM Valuta W1 V040.log
echo compiling... %file_name%
%metaeditor% /compile:"%file_path%\%file_name%" /inc:%include_path% /log
type "%file_path%\%file_log%"
del "%file_path%\%file_log%"
echo.
set file_name=LIA MM Valuta W1 V041.mq5
set file_log=LIA MM Valuta W1 V041.log
echo compiling... %file_name%
%metaeditor% /compile:"%file_path%\%file_name%" /inc:%include_path% /log
type "%file_path%\%file_log%"
del "%file_path%\%file_log%"
echo.
Sorry, this row must be without the last backslash!
set file_path=C:\Users\Manuele\AppData\Roaming\MetaQuotes\Terminal\XXXXXX\MQL5\Experts\Prg
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
Is there a possibility to create a batch file in dos to be able to recompile any number of files and create executables?
Thanks in advance
Manuele