Working with console application
All the import options are set in template (*.itm) files. A template can be also used in the Console version of Data Import for MySQL.
To create a template file, follow the instructions below:
- start Data Import Application wizard;
- set all the required options in all steps of the wizard;
- test the import process at the last step;
- save all import options in the template.
Console application also generates the *.log file that contains information about the import operation completion.
The easiest way to start Data Import for MySQL console application is to double-click the generated *.itm template. The other way is to enter the command line and type the appropriate command.
Usage:
<path to Data Import for MySQL console application>\MyImportC.exe TemplateFile [-datafile=<source file name>] [-B]
datafile
Indicates the source file for data import.
TemplateFile
Stands for the *.itm template file to be used as the console version execution parameter
[-B]
Use this parameter in the command line to run the console version of Data Import for MySQL in the background mode
Example:
"C:\Program Files\EMS\Data Import for MySQL\MyImportC.exe" "C:\EMS\DataImport\Template1.itm" -B
Note: The result of the latest task performed by Data Import for MySQL can be found in the system variable '%ERRORLEVEL%'.
0 - successful completion;
1 - error(s) occurred during task performing;
2 - fatal error occurred. The task was not performed.



