Re: loop through folders and sub folders to load multiple excel files
aparna v wrote:
I am using the below code to loop through folder
sub DoDir (Root)
for each Ext in 'xslx'
for each FoundFile in filelist (Root&'/*.' &Ext)
'$(FoundFile)' as FullPathName,
'$(Dir)' as FileDir, // Where this variable stored in? Looks like stored this after the Next statement that means you are going to break the code. Can you reload after copy paste of below For each to before this?
right('$(Dir)', 8) as FileDate,
Subfield(Subfield('$(File)', '\', SubstringCount('$(File)', '\') + 1), '.', 1) as FileBase, // I haven't seen anything here related File
FileSize('$(FoundFile)') as Size
for each Dir in dirlist (Root&'/*' )
call DoDir (Dir)
call DoDir ('lib://path')
Life is so rich, and we need to respect to the life !!!