Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
shaybitton
Partner - Contributor III
Partner - Contributor III

Load the last QVD in a certain folder

Hi all,

Module A  is generating a QVD file in the 5th  and 10th day in each month, and named as that date - '07102016' (for example) to SHAY folder

module B supposed to contain and reload  the last QVD generated to the SHAY folder and reload in the above dates ( 5, 10 )

how should i do it?

thanks in advance

3 Replies
boorgura
Specialist
Specialist

If I understand correctly,

you are adding 2 QVDs per month to FOLDER-A.

in Folder-B, you only want the latest 2 QVDs?

If naming need not be the same. then you can have the same script to store as 07102016.qvd in FOLDER-A and 10.qvd in FOLDER-B

Next month when 08102016.qvd is created in Folder-A --> In Folder-B, 10.qvd will be replaced.

saimahasan
Partner - Creator III
Partner - Creator III

Can you please elaborate your question??

mohamed_ahid
Partner - Specialist
Partner - Specialist

for Each File in ('folder with QVDs ')

Folder:

LOAD distinct

     num(FileBaseName()) as Folder_Name

     FROM $(File)

;

next  File

max_folder:

load max(Folder_Name) as Last_folder

resident Folder;

let last_folder=FieldValue(Last_folder,0);  //this is your last folder