It is possible to execute EasyMorph projects (.morph files) from the command line. This can be used for scheduling EasyMorph projects using Windows Task Scheduler or other 3rd party tools. Project execution in the command line mode is activated by using the /c key.
Run project from the command line without parameters:
morph.exe /c myproject.morph
Project parameters can be defined from the command line as well. If a project parameter is not defined from the command line than it keeps its default value. If a parameter name or parameter value contains spaces then it must be wrapped in double quotes.
morph.exe /c myproject.morph /param:Year=2015 /param:"File name"="C:\My Documents\input.csv"
morph.exe /c /report myproject.morph
Generate report (using parameters):
morph.exe /c /report myproject.morph /param:Year=2015 /param:"File name"="C:\My Documents\input.csv"
Override default location of the license key (from the configuration file):
morph.exe /c myproject.morph /key:"C:\EasyMorph.key"
Generate documentation from the command line (the project is not run, only documentation is generated):
morph.exe /document myproject.morph
Option /document can be combined with /c for project execution.
Errors occurred during command-line execution are written into log file with the same name as the project (e.g. myproject.log). Log files are created in the same directory as projects.
Fatal (system errors) are written into EasyMorph.log located in C:\Users\<username>\AppData\Local\EasyMorph.
A log directory can be specified using option
/projectLogPath, for instance:
morph.exe /c myproject.morph /projectLogPath:"C:\logs\easymorph"