Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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();

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful