# From a Batch File

Batch processing can be used to run either a single .ipi or a list of .ipis. An .ipi file is set up and saved in Inaport and is the procedure used by Inaport to import records into GoldMine.
A text editor is used to create a text file with the name and path of the executable together with the name and path of the .ipi/s to be run. The text file is then saved with the extension ".bat"

Below are explanations and examples of how to use these operations. All the examples assume that the names of the .ipis to be run are CreateContacts.ipi and CreateDetails.ipi

Problems With Directory Names

Spaces

If a directory name includes a space then an error will occur. If a directory name contains a space then the whole path must be contained within double quotes. For example, if Inaport is held in the directory:

C:\ip dir\programs

then the text needed to run Inaport from the batch file would be:

"C:\ip dir\programs\Inaport.exe" CreateContacts.ipi

Bear this in mind with the following examples.

Example 1: The batch file and Inaport will be placed in the same directory. Inaport and required .ipis are also in the same directory

(Inaport name) (ipi name)
Open a text editor (such as notepad) and type the following:

Inaport.exe CreateContacts.ipi

Where CreateContacts.ipi is replaced with the name of the required .ipi.
Save the file as "filename.bat". The "bat" extension is the key to creating a batch file. Do not save the file with the extension ".txt".

Using Windows Explorer, navigate to the batch file and double click it. This will run the ipi.

If more ipis are required, edit the previously created batch file by right clicking onto it and selecting "edit with notepad." Then, on a new line, add the following:

Inaport.exe CreateDetails.ipi

Assuming the ipis to be run are called CreateContacts.ipi and CreateDetails.ipi, your batch file would look something like this:

Inaport.exe CreateContacts.ipi
Inaport.exe CreateDetails.ipi

Re-save and run the file.

Example 2: The batch file and Inaport will be placed in different directories. Inaport and required .ipis are in the same directory.

(Inaport path\Inaport name) (ipi name)

For this example, assume that Inaport is in the following directory:

C:\Program Files\InaPlex\Inaport\

This example uses ipis named CreateContacts.ipi and CreateDetails.ipi.
Open a text editor (such as notepad) and type the following:

"C:\Program Files\InaPlex\Inaport\Inaport.exe" CreateContacts.ipi
"C:\Program Files\InaPlex\Inaport\Inaport.exe" CreateDetails.ipi

Navigate to the batch file and double click it. This will run the .ipis.

Example 3: The batch file and Inaport will be placed in different directories. Inaport and required .ipis are also in different directories.

(Inaport path\Inaport name) (ipi path\ipi name)

For this example, assume that Inaport is in the following directory:

C:\Program Files\InaPlex\Inaport\

and the .ipis are in this directory:

C:\testIpis

This example uses ipis named CreateContacts.ipi and CreateDetails.ipi.
Open a text editor (such as notepad) and type the following:

"C:\Program Files\InaPlex\Inaport\Inaport.exe" C:\testIpis\CreateContacts.ipi
"C:\Program Files\InaPlex\Inaport\Inaport.exe" C:\testIpis\CreateDetails.ipi

Navigate to the batch file and double click it. This will run the ipis.