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: 
Not applicable

How check same text file name in folders

Hi Friends,

I have files in folders structure like this

Data\Countries\USA\xxx.txt,

Data\Countries\UK\xxx.txt,

Data\Countires\Germany\xxx.txt.

Before getting the data I need to check wether the xxx file exists in the folders.

IF not I want to inform the user the country where the user dint place the text file.

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you have a table with countries you can use that. See attached example.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can use the filetime function to check for the existence of a file

if (filetime('Data\Countries\UK\xxx.txt')) then

     ... // file exists

else

     ... // file does not exist

endif


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks

Should I write seperate path each country??

Can I  record all the paths where we don't have xxx file into a Table??

Thanks

Pavan

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you have a table with countries you can use that. See attached example.


talk is cheap, supply exceeds demand
Not applicable
Author

Great Thank So much