Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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,


1 Reply

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

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

Community Browser