How can I use the tFileExist component in Talend?

Using Talend, I want to check if there is a file called ListePS.xls in my D:/ to do something else differently.

How to check if a file exists in Talend?

+6
source share
3 answers

you must use the tFileExist component with two IF outputs:

  ((Boolean) globalMap.get ("tFileExist_1_EXISTS")) for the case 1(File existence) ! ((Boolean) globalMap.get ("tFileExist_1_EXISTS")) for case 2 (non-existence of file) 
+8
source

To make sure that the file exists, you can use the tFileExist component and connect to your conditional treatment using the Run if link.
For parameter details and usage examples, you can check out the Talend documentation available in your installation. From the Talend menu, select Help> Help Contents , and then Talend User Documentation> Integration Components> tFileExists .

+7
source

Work on a project as shown below

 tFileExist----If(Exist)-------Use other Components \ \ If(Not Exist) add other flow 

Add the code below to the first condition IF ((Boolean) globalMap.get ("tFileExist_1_EXISTS")) , and the second condition IF will be !((Boolean) globalMap.get ("tFileExist_1_EXISTS")) .

+5
source

All Articles