Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Prabhu1204
Creator
Creator

Delete Qvd older than 2 months

Hello All,

I am developing a Qlik sense Dashboard and storing a qvd for current and Previous month.  

In the Qliksense script I need to delete the qvd's older than 2 months.

Is that possible? and any example?

 

 

-Prabhu
4 Replies
Prabhu1204
Creator
Creator
Author

@Kushal_Chawda Could you please help

-Prabhu
ArnadoSandoval
Specialist II
Specialist II

Hi @Prabhu1204 

Qlik's scripting can't delete objects on the file system, including QVD, you will be better off writing a Powershell script of a batch file to delete them.

hth

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
EliGohar
Partner - Creator III
Partner - Creator III

As @ArnadoSandoval wrote, you can't delete files using Qlik sense script.

The least you can do is to truncate those QVDs, but I guess it's not enough for you.

Chanty4u
MVP
MVP

You don't need to do it from Qlik at all - a single command in a cmd-file which can run each day is all you need:

 

delete-QVDs-older-than-180-days.cmd

ForFiles /p "C:\QVDFolder" /m *.QVD /d -60 /c "cmd /c del @file"

 

 

check this link for more details:

https://community.qlik.com/t5/New-to-Qlik-Sense/QVD-Deletion-from-Script/td-p/94037