

Creator III
2019-02-27
02:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
3,582 Views
2 Solutions
Accepted Solutions


Master II
2019-02-27
03:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
apostrophes work for me.
3,583 Views


Creator III
2019-02-27
03:52 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
for each Dir in dirlist('$(vFileQVD)' & '\*')
OK, thanks, that worked.
3,593 Views
2 Replies


Master II
2019-02-27
03:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
apostrophes work for me.
3,584 Views


Creator III
2019-02-27
03:52 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
for each Dir in dirlist('$(vFileQVD)' & '\*')
OK, thanks, that worked.
3,594 Views
