Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Tags (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Not applicable

Re: Re: How check same text file name in folders

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


talk is cheap, supply exceeds demand
4 Replies
Gysbert_Wassenaar
Not applicable

Re: How check same text file name in folders

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

Re: How check same text file name in folders

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

Re: Re: How check same text file name in folders

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


talk is cheap, supply exceeds demand
Not applicable

Re: How check same text file name in folders

Great Thank So much