Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Berg_127
Contributor II
Contributor II

Looping Through Folders

Hi There,

I am not that advanced in QlikView coding and require assistance with the following:

I have about 100 folders containing Client quotations. Some of these folders contain sub-folders and those sub-folders contain updated versions of a quotation.

I need to create a report that extracts the quote values from the various quotes located in each folder. Instead of going through each folder and sub-folder, I require a script that loops through all folders and sub-folders and extracts the quote value and client name from the file (Excel file).

Is this something that can be done via QlikView?

Many thanks. 

Labels (1)
2 Replies
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

 

You can use a recursive function like :

 

sub subFolder(folder)

TRACE $(folder);

FOR Each vFile in FileList('$(folder)\*')
TRACE $(vFile);
//Load your files
NEXT

FOR Each vFolder in DirList('$(folder)\*')

TRACE $(vFolder);

CALL subFolder('$(vFolder)');

next vFolder

ENDSUB


CALL subFolder('C:\Data\000_Admin');
Help users find answers! Don't forget to mark a solution that worked for you!