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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Copy and Reload a qvw using Command Line or VBS in background

I got a requirement to copy a qvw to another qvw and reload that qvw in background, i have done some scripting but could able to figure out the over all picture,

For Copying i used

OldFile = "...\\SectionAccessforEmployeeHierarchy\BASE.qvw"

Set fso = CreateObject("Scripting.FileSystemObject")

SET myfile = fso.getfile(OldFile)

myfile.copy ("...\\SectionAccessforEmployeeHierarchy\Employee&Position.qvw")

For Reloading:

"c:\Program Files\QlikView\QV.exe" /r  /vbatch_flag=1 "..\\SectionAccessforEmployeeHierarchy\Employee&Position.qvw"

this two process are working separately but when i combine them into one file and trying it to execute, it is showing some exception, Please go through with them and let me know if i am missing any thing ASAP.

Regards & Thanks,

Siva

1 Reply
marcus_sommer

To execute a batch-file from vbs you could use a code-snippet like this from: QlikView Maven: QlikView Command Line and Automation

Set objShell = CreateObject("WScript.Shell")
objShell.Run """c:\Program Files\QlikView\QV.exe"" /r /vbatch_flag=1 c:\reports\Inventory.qvw"

What your code might mssing is a sleep-statement between copy and reloading and if the copy-job isn't finished before starting the reload.

- Marcus