Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I generated (for testing purposes) many files inside SaaS DataFiles folder, about 7,000 qvds. I wanna delete them using a batch command or action, but wihtin SaaS only can delete them one-by-one.
How can I delete about 7.000 files from my tenant?
P.S. I seek a solution in QLIK-CLI, but i didn´t found any command to do that.
Tks,
Pedro
$files = qlik raw get v1/qix-datafiles | ConvertFrom-Json
while ($($files.Length) -gt 1) {
foreach ($file in $files) {
Write-Host "Deleting $($file.name)"
qlik raw delete v1/qix-datafiles/$($file.id) | Out-Null
}
$files = qlik raw get v1/qix-datafiles | ConvertFrom-Json
Write-Host 'Next page'
}
Assumptions:
@pedrobergo , I can help you. I will dm you in the morning us east. Please install qlik-cli by following directions on https://qlik.dev.
regards,
Hi @Jeffrey_Goldberg ,
Tks a lot. I consider that i´m have some know-how with qlik-cli, maybe not too much, but i´m already created scripts to upload automcatilly qvf, extensions, publish apps and sheets and create our demo environments.
Following directions on qlik.dev i didn´t found any mention about files manipulation. The 'qlik items ls | ConvertFrom-Json' command just response 'apps' resource-type.
Tks in advance,
Pedro
$files = qlik raw get v1/qix-datafiles | ConvertFrom-Json
while ($($files.Length) -gt 1) {
foreach ($file in $files) {
Write-Host "Deleting $($file.name)"
qlik raw delete v1/qix-datafiles/$($file.id) | Out-Null
}
$files = qlik raw get v1/qix-datafiles | ConvertFrom-Json
Write-Host 'Next page'
}
Assumptions:
Hi, I'm new to qlik cli, appreciate it if you can provide the command line that delete specific group of files for instance, need to delete a group of QVD files that start with ABC and dated 3 months and above. Is it possible to do so? thank you.
I can't give you the script but yes that would be possible. The API for "qix-datafiles" returns the name of the file as well as the createdDate and modifiedDate depending on which you are trying to use.
Hi, how can I delete the files in shared/managed spaces using qlik cli? Based on the above it is meant for the personal space only.
Hi Jeffrey,
I have a similar situation with thousands of files I need to cleanup from a shared space. please are you able to share your script.
regards
Didier
Hi Levi,
Do you know where i can find the v1/qix-datafiles endpoint documentation?
thx
I have the same situation here with hundreds of files on a shared space that I need to delete. How to do it ?
Any thoughts @Levi_Turner , @Jeffrey_Goldberg ?
Thanks !