Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Gazza
Contributor III
Contributor III

Script to move qvd files from 1 space to another

Hi,

Does anyone know how to write a script that would loop through all the data folders in my Personal Space looking for any qvd's that start with 'EXT_' and copy them all into another Space called 'Target Space' ?

 

thanks

Labels (1)
3 Replies
rafaelencinas
Partner - Creator II
Partner - Creator II

Hi @Gazza 

 

Solution 1

You can move and rename your QVDs by Administration Console 

 1 - Rename QVDs

rafaelencinas_2-1750266489958.png

 

2 - Move QVDs

 

rafaelencinas_1-1750266395737.png

 

rafaelencinas_0-1750266374581.png

 

 

Solution 2

1 - You must list all files in your personal space

2 - Load each table in memory

3 - Store new table into another space


for each File in filelist ('lib://DataFiles/*.*')

trace $(File);
let vTableName = Replace(File,'lib://DataFiles/','');

trace $(vTableName);

$(vTableName):
Load * From $(File)(qvd);

Store $(vTableName) into ['lib://NewSpace:DataFiles/EXT_'$(vTableName)](qvd);
Drop table $(vTableName);


next File

 

You cannot delete QVDs from script, you must have do it for Management Console or when you click in the data connection to read a file and click in the trash in the right

 

 

Bye !

 

Senior Qlik Architect
Cobra, Stallone, "You're a problem and I'm the solution"
Sierd_Boersma
Partner - Contributor II
Partner - Contributor II

Or you can write a powershell script with qlik CLI then you can delete the files.

Gazza
Contributor III
Contributor III
Author

Thanks both of you.


My end goal here is to schedule a Qlik file to run each day (eventually in Prod) that will just copy over qvd's from different data folders, so not deleting anything, into a folder for Self Serve people to use.

Is there a better way to do this?

thanks