Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

TfileExist - forEach - tFileCopy work with

hi
I have to ,foreach values in the tForeach componenent, copy a file namming with that value if exist
I try to use those 3 components (seems to be the right ones !? to do this job) but without success.
Starting job archivage_reception at 16:23 14/11/2008.
Exception in component tFileCopy_1
java.lang.RuntimeException: The source File "RCPO" does not exist or is not a file.
at getattachment.archivage_reception_0_1.archivage_reception.tFileCopy_1Process(archivage_reception.java:311)
at getattachment.archivage_reception_0_1.archivage_reception.tForeach_1Process(archivage_reception.java:253)

Missing a condition expression I guess but where and how ...
I've tried witn "run if" between fileExist ans filecopy
tfileExist =>run if =>tfileCopy

Sure it's no so difficult -lol)

filename int tFileExist :
......TE/EN-TRAITEMENT/"+((String)globalMap.get("tForeach_1_CURRENT_VALUE"))

filename from tfilecopy
((String)globalMap.get("tForeach_1_CURRENT_VALUE"))

thanks for your help
Labels (3)
2 Replies
youssef2
Contributor
Contributor

Hi Kzone,
Yes, you're right, the tfileExist component work with the link "run if". the condition to insert by clicking on the run if link is ((Boolean)globalMap.get("tFileExist_1_EXISTS")). tFileExist_1 is the name of your component. I hope this helps Smiley Happy
Regards,
Youssef
Anonymous
Not applicable
Author

thanks a lot youssef
It work fine now !
with just a little chnage in the filename TfileCopy component
((String)globalMap.get("tFileExist_1_FILENAME"))

++