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

Check if multiple files exist

Hi,
Is someone able to explain to me what components to use and how I can do the following?
I have a table which references a path and filename of a collection of files location on a mapped network drive.
I want to be able to iterate through each row of the table, and then based on the path and filename, confirm that the file actually exists.
I've had a look at the tfileexist component but this does not seem to take a file path input.
Thanks,
Simon
Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi Simon
tFileExist is the suitable component to check if the file exist or not, the job looks like:
tMysqlInput--row1--tFlowToIterate--iterate---tFileExist
Assuming that you query two fields from the table: filepath and filename
in the filename/stream field of tFileExist:
row1.filepath+"/"+row1.filename
Best regards
Shong
Anonymous
Not applicable
Author

Thanks Shong.
1 more basic question. I now need the id, filename and a true / false (if exists) to be written to file.
How to I capture the result of the tfileexist component to output?
Thanks,
Simon
Anonymous
Not applicable
Author

Thanks Shong.
1 more basic question. I now need the id, filename and a true / false (if exists) to be written to file.
How to I capture the result of the tfileexist component to output?
Thanks,
Simon

Base on your request, the job looks like:
tMysqlInput--row1--tFlowToIterate--iterate---tFileExist_1--oncomponentok--tFixedFlowInput--main--tFileOutputDelimited
on tFixedFlowInput, add three columns on the schema: id, filename and isExist
columnName:value
id 0683p000009MPcz.pngInteger)globalMap.get("row1.id")
filename 0683p000009MPcz.pngString)globalMap.get("row1.filename")
isExist 0683p000009MPcz.png(Boolean)globalMap.get("tFileExist_1_EXISTS"))
on tFileOutputDelimited, check the box 'append'
Best regards
Shong