9.1.3 Executing jamCsvImport.bat
This subsection gives the function, format, options, return value, notes about command execution, and an execution example of jamCsvImport.bat, which executes the import operation equivalent to the Import job menu from the command line.
jamCsvImport.bat is stored in the following folder:
Asset-Console-installation-folder\exe
- Organization of this subsection
(1) Function
This command registers, updates, and deletes CSV file data from the asset management database. The CSV file information is registered in a batch operation into the asset management database, based on the conditions. For details about how to create conditions, see 16.10.2 Creating import conditions.
When an asset type is specified, information is registered in a batch operation into the asset management database based on the default settings. For details about the items imported based on the default settings, see 20.4 Items to be imported or exported using a job menu.
(2) Format
jamCsvImport.bat "CSV-file-path" " { -c conditions-name [-o processing-format] | -a asset-type -o processing-format } "
(3) Options
- CSV-file-path
-
Specifies the CSV file to import, in terms of the file path. This option is mandatory.
- -c conditions-name
-
Specifies the name of the import conditions saved from the Import window.
- -o processing-format
-
Specifies a code indicating the import processing format, as shown in the table below. This option can be omitted when a conditions name is specified. This option must be specified when an asset type is specified.
Processing format
Meaning
001
Add
002
Update
003
Add update
004
Delete
- -a asset-type
-
Specifies a code indicating the type of asset information to be imported, as shown in the table below. When this option is specified, import adheres to the default settings.
(4) Return value
The following table shows the return values.
Return value |
Meaning |
---|---|
0 |
Normal end. |
1 |
No data. |
2 or more |
Error occurred during processing. |
(5) Notes on command execution
A user with administrator permissions must execute jamCsvImport.bat.
(6) Example
jamCsvImport.bat "c:\temp\Hardware.csv" -a 001 -o 001
If the file path is omitted during command execution, Asset-Console-installation-folder\scriptwork becomes the current working directory.