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: 
Anonymous
Not applicable

how to drop old qvds

Hi,

I have number of qvd's in particular folder for reference i added below image

qvd.png

from here I need last 5 days QVDs only for example from current date qvd to  last 5 days qvd. In below i attached my expected output image

nn.png

Help me to handle in script. thanks in advance

thanks,

yuvaraj G

3 Replies
sunny_talwar

Anonymous
Not applicable
Author

sunny,

give me any alternate solution its difficult to understand

Anil_Babu_Samineni

May be this? Make sure, to change as per your date format which is comment as below

SET DateFormat = 'MMDDYYYY';

SET vRoot = 'C:\myfolder';

FOR Each File in filelist ('$(vRoot)'&'\*.'&qvd);

FileName:

Load Replace(SubField('$(File)', '_', 2),'.qvd','') as Name;

// Load Date(Date#(Replace(SubField('$(File)', '_', 2),'.qvd',''),'MMDDYYYY'),'DD-MM-YYYY') as Name;

next File;

Load * Resident FileName where Name > Today()-5 and Name <= Today();

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)