Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Delete the QVD which are more than last 12 months

Hi Frnds,

        I need you help to automate the QVD deletion process.

  1. 1. For each month we are creating one qvd in the name of monthworkendday of the month xxxx31112014.qvd

     and my requirement is i want to keep only last 12 months qvd other qvd's i need to delete. Please help me with this requirement.

Regards,

sushil

4 Replies
neetha_p
Not applicable

Re: Delete the QVD which are more than last 12 months

agomes1971
Not applicable

Re: Delete the QVD which are more than last 12 months

Hi,

First, consider that a STORE statement will overwrite the existing QVD file.

To specifically delete the qvd file, try an EXECUTE script statement.

EXECUTE CMD.EXE /C del "myqvd.qvd";

Now you just have to use some date variables to assign dates...

Hope it helps

André Gomes

bill_markham
Not applicable

Re: Delete the QVD which are more than last 12 months

Nitha

Your file names like xxxx31112014.qvd are easily parsed  to identify their creation date and hence whether deletion candidates.

Most IT shops will have in house scripts [Powershell, vb, dos, whatever..] for such housekeeping, if your shop does then use them as a template and take the housekeeping out of the QlikView side of things.

Coincidentally I was sorting a Powershell archiving script for incoming csv data files files yesterday.

Bill

Not applicable

Re: Delete the QVD which are more than last 12 months


Hi Friends,

         My problem is to automate it not hard codeing or something. Let me explain clearly...

I am extracting the data and storeing in the qvd which contains one month workingdays data in the name like factdata_31102014,factdata_30092014,factdata_29082014..................................................factdata_29112014.

Now my requirement is when it incremented by one month then i will have factdata_28112014(current month data) then i want to delete factdata_31102014 qvd becuase it is old than 12 months...

i want to automate the above process.... please help me out................