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.

ariel_klien
Valued Contributor

Wiledcard match in a script

Hello all experts

I have in the script Load from wildcard match. e.g:

let vPath='C:\Path\'

\\ in C:\Path there is 2 files aaa_1_aaa.qvd and aaa_2_aaa.qvd

Load *

From $(vPath)aaa_*_aaa.qvd(qvd);

in the qvw log I see:

Load *

From C:\Path\aaa_*_aaa.qvd(qvd);

Load *

From C:\Path\aaa_*_aaa.qvd(qvd);

What I want is to see all the files that i loaded

Load *

From C:\Path\aaa_1_aaa.qvd(qvd);

Load *

From C:\Path\aaa_2_aaa.qvd(qvd);


who can tell me how can I archive that?


BR


Ariel

Tags (2)
1 Solution

Accepted Solutions
jagannalla
Valued Contributor III

Re: Re: Wiledcard match in a script

Hi,

Please find the attached files. I can able to see file names in log file.

File is not a variable it is used as iteration. Please check the vPath variable according to your qvd file location. You can find the file names in attached log file.

Cheers!!

Jagan

6 Replies
MVP
MVP

Re: Wiledcard match in a script

Try something like:

For Each vPathPart2 in 1, 2

Load *

From $(vPath)aaa_$(vPathPart2)_aaa.qvd(qvd);


Next vPathPart2

Edit: Corrected NEXT part

jagannalla
Valued Contributor III

Re: Re: Wiledcard match in a script

Hi,

Try this

SET vPath='D:\QvwEx\Path\';

FOR Each File in filelist (vPath&'*.qvd')

Load *

From $(File)(qvd);

NEXT File

Hope it helps you!!

Cheers!!

Jagan

ariel_klien
Valued Contributor

Re: Wiledcard match in a script

HI Tresescoe

Thanks for your answer but the numbers are just an example.

I have few files with different names inside them and those files are going to grow... I want something that will take all the files from this location without my maintenance.

the wildcard is doing that but he doesn't show the full file name in the log file.

BR

Ariel

ariel_klien
Valued Contributor

Re: Wiledcard match in a script

Hi Nalla

I tried it but the File variable is Null.

any Idea?

Ariel

jagannalla
Valued Contributor III

Re: Re: Wiledcard match in a script

Hi,

Please find the attached files. I can able to see file names in log file.

File is not a variable it is used as iteration. Please check the vPath variable according to your qvd file location. You can find the file names in attached log file.

Cheers!!

Jagan

ariel_klien
Valued Contributor

Re: Wiledcard match in a script

Working!!

Thanks!