Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Haven't managed to find anything online which seems to work.
I have a folder lets say D:\Backup. Within that folder I have a series of folders, one for each day i.e. backup20180101, backup20180102 and so on. I am trying to write a script that will return the subfolder names into a single table. I know how to get this for the files contained within, but in this case I need the folder names.
Can anyone give any hints here, I have tried Directory and DoDir functions in a loop, but couldn't seem to get anything to work..
Thanks!!
Hi Thomas. Maybe this
For each vSubDir in dirlist( 'D:\Backup\*' )
Table: LOAD '$(vSubDir)' as DirName AutoGenerate 1;
Next SubDirectory
Hi Andrey,
Ran the code, doesn't seem to return any results... ?
Sorry Thomas, my mistake. Confused in the variables...
For each vSubDir in dirlist( 'D:\Backup\*' )
Table: LOAD '$(vSubDir)' as DirName AutoGenerate 1;
Next vSubDir
Hello
This also do not gives any result.
Regards
Krishn
Hi there,
The script by andrey_krylov works for me - but perhaps may not always work if you have the default file system restriction switched on on the newer versions of Qlik.
Here is something from the Qlik website that may assist - Example 2: Creating a list of files on disk:
You can adjust this to load a list of folders by adding something like a subfield to the '$(File)'