Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Anyone please help me in with below QV Code, I am not able to load files from Sub-directories..
set Concatenate=;
sub ScanFolder(Root)
for each Ext in '.xls' // use this to identify file names to load but I can't use the wildcard to pull all File1*
for each FoundFile in filelist(Root & '\*.' & xls)
FileList:
$(Concatenate)
load *
from [$(FoundFile)](biff, embedded labels, header is 2 lines, table is [$(*)]); // my load has different parameters depending on the file name.
set Concatenate = concatenate;
next FoundFile
next Ext
for each SubDirectory in dirlist(Root&'\*')
call ScanFolder(SubDirectory)
next SubDirectory
end Sub
Call ScanFolder('D:\Data\Inputs');
Hi Narsingh,
Please refer to this thread Loop through root directory (including subfolders) and list filenames of *.csv, maybe this solution can be helpful for you.
Regards,
Karla