Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Recursive filelist

I'm trying to change the following line in the script so that it not only looks in My Pictures but also in all the subdirectories of My Pictures. Any ideas how I would go about this?

for each vFoundFile in filelist( GetFolderPath('MyPictures') & '\*.'& vExt )

Many thanks. Paul

4 Replies
prieper
Master II
Master II

Hi,

am not aware on a specific switch. It might be cumbersome, but found a solution under
http://vbnet.mvps.org/index.html?code/fileapi/oldestfolder.htm
from where you might grab an idea.

HTH
Peter

Not applicable
Author

Not applicable
Author

Thanks, I managed to work it out using the "for each...next" section of the Help. But beware if you copy and paste the example code for sub DoDir, as it adds a space before the \* and doesn't work! Took me a good half hour to find out why it wasn't working, but now it works a treat.

Not applicable
Author

that's odd, I used that code to look for a specific file in N subdirectories, and apart from changing the root and file extension, it worked perfectly.