Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Run Batch File With Windows Command-Line Interface
To run Data Loader from a configured Windows batch file:
- Include your encrypted password in the configuration file to run a batch operation. For more information, see Data Loader Command Line Introduction and Encrypt from the Command Line.
-
Use the process-conf.xml file to configure batch file processing.
Specify the name of the process in the ProcessRunner
bean's id attribute.
For example,
1<bean id="accountInsert" class="com.salesforce.dataloader.process.ProcessRunner" scope="prototype"> -
Navigate to the Data Loader \bin directory by entering this
command. Replace the file path with the path from your system.
C:\Users\{userName}\dataloader\version\bin
-
To run the batch file, use the correct command syntax for
process.bat:
1process.bat <configdir> [<operation>]where:
- <configdir> (mandatory) The absolute or relative path to the directory containing process-conf.xml. It must be the first parameter when running process.bat.
- <batch process bean id> (optional) The id of the batch process bean of class com.salesforce.dataloader.process.ProcessRunner defined in the process-conf.xmlfile. If not provided, then the value of the process.name property in the config.properties file is used.
Running process.bat using both parameters
To execute Data Loader in batch mode, we’ll use the beans, their properties and attributes specified for a ProcessRunner bean with id="accountInsert" in the process-conf.xml file located in C:\Users\username\dataloaderconfig directory.
1process.bat "C:\Users\username\dataloaderconfig" accountInsert