Do you mean based on the format of the file name and the extension (and not the contents within) you want to process and send them to different output directories?
yes. I have four different files, like stated below:
1) abc.csv
2) rdf.xls
3) bnn.txt
4) mut.csv
I have ysed the below code for single file(message.csv):
Code:
<file:inbound-channel-adapter id="mfInputFileProcessor"
directory="file:${input.directory}" filename-pattern="message*">
<poller id="mfInputPoller" fixed-delay="10" time-unit="SECONDS" />
</file:inbound-channel-adapter>
<file:file-to-string-transformer
input-channel="mfInputFileProcessor" output-channel="mfInputFileParser"
charset="UTF-8" delete-files="false" />
<splitter input-channel="mfInputFileParser" ref="mFileHandler"
method="extractLines" output-channel="message.inbound" />
<int:service-activator input-channel="mfInputFileProcessor" output-channel="filesOut" ref="mFileHandler" method="handleFile"/>
<file:outbound-channel-adapter id="filesOut"
directory="${output.directory}"
auto-create-directory="true"
delete-source-files="false" charset="UTF-8"/>
Do i need to use the above code 4 times, if I would like it to process 4 different file?
Regards,
Mahendra Singh