Newer Version Available

This content describes an older version of this product. View Latest

Run Batch File With Windows Command-Line Interface

For automated batch operations, such as nightly scheduled loads and extractions, run Data Loader from the Windows command-line.
Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer editions

The Data Loader command-line interface is supported for Windows only.

Note

To run Data Loader from a configured Windows batch file:

  1. 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.
  2. 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,
  3. 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

  4. To run the batch file, use the correct command syntax for process.bat:

    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.

If you experience login issues in the command-line interface after upgrading Data Loader, try encrypting your password again to solve the problem. For information, see Encrypt from the Command Line.

Tip