Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
QFanatic
Creator
Creator

Space in File name while reading in Loop, maybe causing problem?

Hi guys

I am trying to read qvd names in a loop. However there is a space in the file names and I think this causes it not to work.

(vReportMonth = 202008)

let path_All = '\\server\QlikView\QVData\MyFiles_Vods_ $(vReportMonth)*.qvd' - note there is a space between the '_' and $...

for each file in filelist (path_Alles)
vods:
load
 Stuff
From
$(file)(qvd) group by log_date,log_time,func_desc,type ;
CNT = CNT + 1;
next file

It is not picking up any files (files = <null>) - I am assuming I need to 'tell' the variable implicitly that there is a space? Any help please?

Thank you!

1 Solution

Accepted Solutions
marcus_sommer

Then check (maybe with TRACE) that both variables vReportMonth + path_All contain the expected content and that path is really valid. Further change the variable-call within the filelist-loop to:

for each file in filelist ('$(path_Alles)')

... just see path_All <>  path_Alles ...

- Marcus

View solution in original post

3 Replies
marcus_sommer

Yes, the path needs to be wrapped like:

load Stuff From [$(file)] (qvd);

- Marcus

 

QFanatic
Creator
Creator
Author

Hi Marcus, Thanks for your reply.

Changed as you suggested, still same error.

marcus_sommer

Then check (maybe with TRACE) that both variables vReportMonth + path_All contain the expected content and that path is really valid. Further change the variable-call within the filelist-loop to:

for each file in filelist ('$(path_Alles)')

... just see path_All <>  path_Alles ...

- Marcus