Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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.