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

[resolved] How to check either the file is exist or not

Hi, 
I need to check either file is exist or not.
The overall job :

0683p000009MG2n.png
The file is exist, but the result "false".

Setting on tfilelist :

0683p000009MG2o.png

Setting on tfileexist : 

0683p000009MG2s.png

If condition :
0683p000009MG1C.png

Thanks

Labels (2)
3 Replies
vapukov
Master II
Master II

for what reason You use combination - tFileList -> tFileExists?

tFileList always give You only existed files
if for any reason You use tFileExists
if condition

((Boolean) globalMap.get ("tFileExist_1_EXISTS"))==true
Anonymous
Not applicable
Author

if i changed setting on tfileexist to "((String)globalMap.get("tFileList_2_CURRENT_FILEPATH"))" the result will "true".
If the file not exist will get error on tfileexist
[color=#ff6633][FATAL]: dicu_igatev1.test_d_r01_myresults_sppii_vot_code_0_1.TEST_D_R01_MYRESULTS_SPPII_VOT_CODE - tFileExist_1 null[/color]
Exception in component tFileExist_1
java.lang.NullPointerException
0683p000009MG2x.png
vapukov
Master II
Master II

for what are You doing this?
tFileList - not return nothing if no files - it list only what in folder, all files by pattern
tFileExist need ONLY when You want check specific files
for tFileList (if You need if-trigger) - use NB_FILES it will be 0 if nothing or more than 0