Using Talend, I want to verify if there is a file named ListePS.xls
in my D:/
to do some treatment else nothing.
How do I check if file exists in Talend?
Using Talend, I want to verify if there is a file named ListePS.xls
in my D:/
to do some treatment else nothing.
How do I check if file exists in Talend?
you must use the component tFileExist with two outputs IF:
((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)
In order to verify that a file exists, you can use the tFileExist component and connect to your conditional treatment with a Run If link.
For parameterization details and usage examples, you can consult the Talend documentation, available in your installation.
In the Talend menubar, select Help > Help contents and then Talend User Documentation > Integration components > tFileExists.
Design job like below
tFileExist----If(Exist)-------Use other Components
\
\
If(Not Exist) add other flow
Add below code in first IF condition ((Boolean) globalMap.get ("tFileExist_1_EXISTS"))
and in second IF condition will be !((Boolean) globalMap.get ("tFileExist_1_EXISTS"))
.