Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Michiel_QV_Fan
Specialist
Specialist

Command line, asked to replace file

I have a bat to take care of some reloads.

It fails because Qlikview opens and asks if the document should be replaced. Of course the whole purpose of this bat is to not have manual clicks.

What am I missing?

This is my command:

set source=D:\QVS01\DistributionFolder\New\

set currentqvw=document_2.11.qvw

set archiveqvw=document_2.11.old

set sourceqvw=document_2.12.qvw

set sourceqvs="document.qvs"

set reloadcommand="C:\Program Files\QlikView\QV.exe"

set reloadswitch1=/r

CD "D:\QVS01\QVAPPS\somefolder"

ren %currentqvw% %archiveqvw%

CD %source%

copy %sourceqvw% "D:\QVS01\QVAPPS\somefolder"

cd %source%

copy %sourceqvs% "D:\QVS01\QVAPPS\somefolder"

CD "D:\QVS01\QVAPPS\somefolder"

%reloadcommand% %reloadswitch1% D:\QVS01\QVAPPS\somefolder\%sourceqvw%

etc. etc.

1 Solution

Accepted Solutions
Michiel_QV_Fan
Specialist
Specialist
Author

Found it.

User preferences: Save before reload.

Unchecked this and it works as expected.

View solution in original post

3 Replies
Not applicable

You can add "/y" to the end of the copy command line to overwrite the file without needing a manual confirmation.

So instead of:

copy %sourceqvs% "D:\QVS01\QVAPPS\somefolder"

use:

copy %sourceqvs% "D:\QVS01\QVAPPS\somefolder" /y

Michiel_QV_Fan
Specialist
Specialist
Author

I wrote my question not clear enough.

Copy command is ok. It's the command line reload statement which asks for replacing the file.

/Y didn't solve this issue.

So this statement asks for the replacement of the file:

%reloadcommand% %reloadswitch1% D:\QVS01\QVAPPS\somefolder\%sourceqvw%

Michiel_QV_Fan
Specialist
Specialist
Author

Found it.

User preferences: Save before reload.

Unchecked this and it works as expected.