Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
tschullo
Creator III
Creator III

Using FOR EACH ... DIRLIST to iterate through multiple folders using wildcards

In the script below, note that there are spaces in the folder path saved as vFileQVD below.

When I run the script, the dirlist command fails.  If I take out the spaces, it works ok.

LET vFileQVD = '\\hbsvr.adroot.myBiz\root\Download\GBL DOG - CAT';
for each Dir in dirlist($(vFileQVD)&'\*')
TRACE $(Dir);
Next Dir
exit script;

How should I wrap the string so I don't get an error?

2 Solutions

Accepted Solutions
m_woolf
Master II
Master II

apostrophes work for me.

View solution in original post

tschullo
Creator III
Creator III
Author

for each Dir in dirlist('$(vFileQVD)' & '\*')

 

OK, thanks, that worked.

View solution in original post

2 Replies
m_woolf
Master II
Master II

apostrophes work for me.

tschullo
Creator III
Creator III
Author

for each Dir in dirlist('$(vFileQVD)' & '\*')

 

OK, thanks, that worked.