I am using Data loader using command line interface(CLI) to export salesforce data in my local system. Also using Windows scheduler to schedule this task on daily basis.
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="Account" class="com.salesforce.dataloader.process.ProcessRunner" singleton="false">
<description>Import Account Data.</description>
<property name="name" value="Account" />
<property name="configOverrideMap">
<map>
<entry key="sfdc.debugMessages" value="true"/>
<entry key="sfdc.debugMessagesFile" value="C:\Users\Ravikant Maurya\Desktop\Key1.og"/>
<entry key="sfdc.endpoint" value="https://login.salesforce.com"/>
<entry key="sfdc.Server host" value="https://www.salesforce.com"/>
<entry key="sfdc.username" value="*****************"/>
<!-- password below has been encrypted using key file, therefore it will not work without the key setting: process.encryptionKeyFile
the password is not a valid encrypted value, please generate the real value using encrypt.bat utility -->
<entry key="sfdc.password" value="******************"/>
<entry key="process.encryptionKeyFile" value="C:\User\Desktop\Key.txt"/>
<entry key="sfdc.timeoutSecs" value="600"/>
<entry key="sfdc.useBulkApi" value="true"/>
<entry key="sfdc.loadBatchSize" value="500"/>
<entry key="sfdc.externalIdField" value="id"/>
<entry key="sfdc.entity" value="Account"/>
<entry key="sfdc.extractionRequestSize" value="10000"/>
<entry key="sfdc.extractionSOQL" value="Select Id, Name, Phone, AccountNumber FROM Account"/>
<entry key="process.operation" value="extract"/>
<entry key="process.mappingFile" value="C:\Program Files (x86)\salesforce.com\Data Loader\samples\conf\accountMasterMap.sdl"/>
<entry key="dataAccess.name" value="C:\Users\Desktop\CSV\CLI\Account.csv"/>
<entry key="dataAccess.type" value="csvWrite"/>
<entry key="process.initialLastRunDate" value="2005-12-01T00:00:00.000-0800"/>
</map>
</property>
</bean>
</beans>
It's working fine and account record is exported in Account.csv file specify by dataAccess.name tag.
My problem is when next day task is running it's override the previous record Account.csv, but i want to create a new record file every day.
I think i have to make dataAccess.name dynamic for each day but i don't know how to do this, if you have any solution to achieve this it will be appreciated.