Open jpjustus opened 3 years ago
Just add following lines in "Get QVD Data" after "Next File" but still inside the Sub:
FOR Each SubDirectory in Dirlist( Root & '*' ) LET FolderName = SubDirectory; CALL DoDir(SubDirectory) NEXT SubDirectory
Maybe a bit late, but I hope someone finds this later. I added an additional tab after Main with the following code to walk through all sub directories:
//-- this sub will walk through all sub directories in the given path
//-- each entry is added to table "QVDFolders"
//-- folders in the inline table in Step 2 will persist (make sure you don't have duplicates)
SUB walkdir (root)
FOR EACH SubFolder in DirList('$(root)');
QVDFolders:
LOAD
'$(SubFolder)' as QVDPath
AutoGenerate 1
;
//-- walk recursive through subfolders
CALL walkdir ('$(SubFolder)\*');
NEXT SubFolder;
END SUB
CALL walkdir ('lib://10 - DS_Datamart/03 - DWH');
//-- just copy & paste if you need more directories
//-- ATTENTION:
//-- this starts with "lib://next/directory/sub_directory" because auf the /* at the end
//CALL walkdir ('lib://next/directory/*');
Hi - I have qvd's sitting on various levels of sub folders on top of the top level folder. In the script, for eg., I have given the qvd folders as below. Is there a way, to provide only the top level folder and the logic can scan through the qvd's in all level of sub folders?
QVDFolders: LOAD * INLINE [ QVDPath lib://SnowFlakeQVD/Test lib://SnowFlakeQVD/Test1 ];