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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to load directory structure (without files) into inline data table?

Heres what I'd like to do:

Get a directory structure (using "For each Dir in dirlist(Root&'\*')") and load it in a QV table.

Can someone help me with a syntax?

Thanks.

Arunas T.

1 Solution

Accepted Solutions
Not applicable
Author

try this:

sub DoDir (Root)

   load '$(Root)' as DirName

   autogenerate 1;

  

   for each Dir in dirlist ('$(Root)\*' )

       call DoDir (Dir)

   next Dir

end sub

 

call DoDir ('D:')

View solution in original post

2 Replies
Not applicable
Author

try this:

sub DoDir (Root)

   load '$(Root)' as DirName

   autogenerate 1;

  

   for each Dir in dirlist ('$(Root)\*' )

       call DoDir (Dir)

   next Dir

end sub

 

call DoDir ('D:')

Not applicable
Author

Thank you! It worked.