Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ariel_klien
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

1 Solution

Accepted Solutions
jagannalla
Partner - Specialist III
Partner - Specialist III

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
tresesco
MVP
MVP

Try something like:

For Each vPathPart2 in 1, 2

Load *

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


Next vPathPart2

Edit: Corrected NEXT part

jagannalla
Partner - Specialist III
Partner - Specialist III

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
Specialist
Specialist
Author

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
Specialist
Specialist
Author

Hi Nalla

I tried it but the File variable is Null.

any Idea?

Ariel

jagannalla
Partner - Specialist III
Partner - Specialist III

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
Specialist
Specialist
Author

Working!!

Thanks!