Complete the following steps in order to configure and run Data Loader in batch mode. **Step 1: Generate an Encryption Key** An encryption key is used to encrypt (scramble for security) your Salesforce login password so it can be stored safely in the configuration file. **For Data Loader version 42 or earlier** cd C:\Program Files (x86)\salesforce.com\Data Loader\bin encrypt.bat -g <seedtext> Example output: security.EncryptionUtil main (EncryptionUtil.java:304) - *************** **For Data Loader version 43 or 44** cd C:\Program Files (x86)\salesforce.com\Data Loader\bin C:\Users\<Windows_username>\.dataloader\dataLoader.key Command: encrypt.bat -k <path to key file> Keyfile "C:\Users\<Windows Username>\.dataloader\dataLoader.key" was created! **For Data Loader version 45 or later** C:\Users\<Windows Username>\dataloader\<Dataloader version>\bin encrypt.bat -k <path to key file> --- **Step 2: Create an Encryption Password** Using the encryption key from Step 1, convert your Salesforce login password into an encrypted password for use in the configuration file. Note: The password used to log in to Data Loader is typically different from your Salesforce login password. Your Salesforce password also requires a security token (a code appended to your password for API access). See Additional Resources for how to reset your security token. **For Data Loader version 42 or earlier** Replace <password> with your Salesforce login password and <filepath> with the location of key.txt: encrypt.bat -e <password> "<filepath>\key.txt" **For Data Loader version 43 or later** Replace <password> with your Salesforce password and provide the path to your .key file: encrypt.bat -e <password> "C:\Users\<Windows Username>\.dataloader\dataLoader.key" --- **Step 3: Create a Field Mapping File** A field mapping file (.sdl) maps the columns in your input CSV file to the corresponding fields in your Salesforce object. SLA__C=SLA__c BILLINGCITY=BillingCity For full details, see "Create the Field Mapping File" in Additional Resources. --- **Step 4: Create the Data Loader Configuration File (process-conf.xml)** The configuration file (process-conf.xml) is an XML file (a structured text file used to store settings) that tells Data Loader how to connect to Salesforce and where to find your data and mapping files. \samples\conf\process-conf.xml entry key="sfdc.endpoint" value="https://login.salesforce.com"/ <entry key="sfdc.username" value="youremail@example.com"/> <entry key="sfdc.password" value="******encryption password from Step 2******"/> <entry key="process.encryptionKeyFile" value="key.txt"/> // For version 42 and earlier <entry key="process.encryptionKeyFile" value="C:\Users\<Windows Username> // For version 43+ <entry key="process.mappingFile" value="test.sdl"/> <entry key="dataAccess.name" value="test_data.csv"/> <entry key="sfdc.debugMessages" value="true"/> <entry key="sfdc.debugMessagesFile" value="testMap.sdl"/> entry key="process.outputSuccess" value="C:\test\success.csv"/ entry key="process.outputError" value="C:\test\error.csv"/ <entry key="dataAccess.type" value="csvRead"/> Key configuration parameters explained: - sfdc.endpoint: Your Salesforce login URL (e.g., https://login.salesforce.com) - sfdc.username: The username Data Loader uses to log in to Salesforce - sfdc.password: The encrypted password generated in Step 2 - process.encryptionKeyFile: Path to the encryption key file from Step 1 - process.mappingFile: Path to the .sdl field mapping file from Step 3 - dataAccess.name: Path to the CSV data file to import - sfdc.debugMessages: Set to true or false to enable SOAP (a protocol for exchanging data) message logging for troubleshooting - sfdc.debugMessagesFile: Path to the file where SOAP messages are stored - process.outputSuccess: Path to the success log file - process.outputError: Path to the error log file - dataAccess.type: Specifies whether Data Loader reads from or writes to a file (e.g., csvRead for input, databaseWrite for output) For full parameter details, see "Data Loader Process Configuration Parameters" in Additional Resources. --- **Step 5: Run the Process from the Command Line** Once all files are configured, run the batch process from the Windows Command Prompt. Replace <file path to process-conf.xml> with the directory containing your process-conf.xml file, and <process name> with the bean ID defined in the configuration file (the value in bean id="*****"): process.bat "<file path to process-conf.xml>" <process name> Once complete, Data Loader runs the specified data operation (such as Insert) from the command line without requiring the GUI.
- Run in Batch Mode (Windows Only): https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta\/dataLoader\/loader_batchmode_intro.htm
- Data Loader Command Line Introduction: https://help.salesforce.com/HTViewHelpDoc?id=command_line_intro&language=en_US
- Create the Configuration File: https://help.salesforce.com/apex/HTViewHelpDoc?id=command_line_create_config_file.htm&language=en_US
- Data Loader Process Configuration Parameters: https://help.salesforce.com/HTViewHelpDoc?id=loader_params.htm&language=en_US
- Create the Field Mapping File: https://help.salesforce.com/articleView?id=command_line_create_mapping_file.htm&language=en_US&type=0
- Reset Your Security Token: https://help.salesforce.com/HTViewHelpDoc?id=user_security_token.htm&language=en_US000386154

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.