Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for Data Integration and Data Analytics gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist
Specialist

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
Highlighted
Partner
Partner

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

View solution in original post

6 Replies
Highlighted
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

Partner
Partner

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

Highlighted
Specialist
Specialist

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

Highlighted
Specialist
Specialist

Re: Wiledcard match in a script

Hi Nalla

I tried it but the File variable is Null.

any Idea?

Ariel

Highlighted
Partner
Partner

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

View solution in original post

Highlighted
Specialist
Specialist

Re: Wiledcard match in a script

Working!!

Thanks!