Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get recursively als qvd files

Hello qlikers, 🙂 

I have the folder Documents/Qlik/QVD and this should be my variable  .
In this folder there also subfolders for example Documents/Qlik/QVD/App1 , Documents/Qlik/QVD/App2, and so on.
In this subfolders der are many .qvd files and other files. 

Is there a option to get (recursively ) all .qvd files from all the folders and subfolders and store then in a certain location for example  Documents/Qlik/QVD/New? 

Thank you in advance!! Looking forward to reading some answers! 

I wish you a good day! 🙂

 

Labels (1)
1 Solution

Accepted Solutions
Taoufiq_Zarra

Hi Steven

I created the following path:

Capture.JPG

in \App1 ->App1.qvd

in\App2-> App2.qvd

\New ->empty

with this Load script :

 

sub GetQVDFIleNames(Root)

    for each FoundFile in filelist( Root & '\*.qvd')
    
    let Namefile=PurgeChar(mid('$(FoundFile)',index('$(FoundFile)' ,'\',-1)+1),'.qvd');
   

        $(Namefile):

            Load * from $(FoundFile) (qvd);
         
         Store $(Namefile) into '.\Qlik\QVD\New\$(Namefile).qvd' (qvd);
         drop table $(Namefile);


    next FoundFile

    for each SubDirectory in dirlist( Root & '\App*' )

        call GetQVDFIleNames(SubDirectory)

    next SubDirectory

end sub

Call GetQVDFIleNames('.\Qlik\QVD') ;

 

here are the contents of the subfolder \New:

Capture.PNG

🕺

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

5 Replies
Taoufiq_Zarra

Hi Steven

I created the following path:

Capture.JPG

in \App1 ->App1.qvd

in\App2-> App2.qvd

\New ->empty

with this Load script :

 

sub GetQVDFIleNames(Root)

    for each FoundFile in filelist( Root & '\*.qvd')
    
    let Namefile=PurgeChar(mid('$(FoundFile)',index('$(FoundFile)' ,'\',-1)+1),'.qvd');
   

        $(Namefile):

            Load * from $(FoundFile) (qvd);
         
         Store $(Namefile) into '.\Qlik\QVD\New\$(Namefile).qvd' (qvd);
         drop table $(Namefile);


    next FoundFile

    for each SubDirectory in dirlist( Root & '\App*' )

        call GetQVDFIleNames(SubDirectory)

    next SubDirectory

end sub

Call GetQVDFIleNames('.\Qlik\QVD') ;

 

here are the contents of the subfolder \New:

Capture.PNG

🕺

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Anonymous
Not applicable
Author

Thank you very much for your great help! 

Unfortunately the  $(Namefile): isn't working. When I'm trying Qlik sende tell me Unknown statement: 

Do you have an idea? 

Thank you in advance! 🙂

Taoufiq_Zarra

attached Qlikview File

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Anonymous
Not applicable
Author

Thank you! But I need .qvf 😞

Taoufiq_Zarra

🙂 ok

attached qvf

lib://QVD/in qliksense is .\Qlik\  in qlikview

 

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉