Consuming files from folders where others drop files directly - 6.3

Talend ESB Mediation Developer Guide

Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Design and Development
Talend ESB

Warning: there may be difficulties if you consume files from a directory where other applications directly write files. Please look at the different readLock options to see if they can help.

If you are writing files to the folder, then the best approach is to write to another folder and after the write, move the file in the drop folder.

However if you need to write files directly to the drop folder then the option changed could better detect whether a file is currently being written/copied. changed uses a file changed algorithm to see whether the file size or modification changes over a period of time. The other readLock options rely on Java File API which is not always good at detecting file changes. You may also want to look at the doneFileName option, which uses a marker file (done) to signal when a file is done and ready to be consumed.