Hi, I able to get the list of filenames. I want to add the step open file that contains specific string from each zipped folder and later concate all into one table. I modified the script as below, but it dont seems opening those files (there are totally 6000+ of it). the 6000+ files that the filename contain "rag" are ".log" type file.
is there a way I can keep append the file into the same table without having open all 6000+ files then only concate?
path ="C:\Users\Desktop\test\";
folders = Files In Directory( path );
tables={};
For( i = 1, i <= N Items( folders ), i++,
If( Word( -1, folders[i], "." ) == "zip",
theFolder = Open( path || folders[i], zip );
dirList = theFolder << dir;
For( k = 1, k <= N Items( dirList ), k++,
If (contains(dirlist[i], "rag"),
rag_file = theFolder << read(dirList[i], format(blob));
Open(path || folders[i] ||"\" || rag_file);
Insert Into(tables, data table(path || folders[i]));
);
);
);
);
dt = New Table ("all_rag_files");
dt << concatenate(tables, append to first table( 1 ), create source column);