I have an elaborate load script (involving hash, flags, etc) that I need to run on every file found in a directory structure very similar to this one from csv files.
In a test load, I used Henric's hic subroutine and called it - I guess I expected it to create the table 'FileList' which would be visible in the Data Model Viewer - which it is not. The script runs without error, I'm just not sure how to implement it.
Here's the sub I used:
Set vConcatenate = ;
for each FileExtension in 'csv'
for each FoundFile in filelist( Root & '\*.' & FileExtension)
LOAD *, '$(FoundFile)' as SourceFile
FROM [$(FoundFile)] (txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 2 lines);
Set vConcatenate = Concatenate;
for each SubDirectory in dirlist( Root & '\*' )
Call ScanFolder('C:\datafiles') ;
In its most simplistic form, I have the following directory structure:
Once I have a filelist I need to do a few things with it: