Regarding your first issue, tWaitForFile component provides various trigger options (created, modified and deleted). You can select the “created” option to read the files when they are added into the directory.
Regarding the 2nd issue, you can try giving your file mask as “.OK” in tWaitForFile and search and retrieve the completed files. Masking your file with “.OK” makes it easier for Talend to search for the relevant files. Then using an iterate link you can connect the delimited or excel or whichever format file input component you want. In my case, I am using a tFileInputDelimited component to fetch the delimited files. Finally, in the “File Name” section you can add the below code:
((String)globalMap.get("tWaitForFile_1_CREATED_FILE")).substring(0,((String)globalMap.get("tWaitForFile_1_CREATED_FILE")).length()-3) + ".txt"
Hope this was what you were looking for.
Get your Talend certification today to become certified professional.