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: 
Not applicable

How to create a batch file

Hi

Can some tell me how to develop a batch file??

I want to create one batch file for reading data from file say 'file.txt' and this  'file.txt' contains user information like username, his/her ID, name of the application he/she has accessed etc.

Regards

Avantika

31 Replies
Not applicable
Author

Thnaks Ravi, its helpful..!!

pkkushwaha
Partner - Contributor II
Partner - Contributor II

Hi All,

My problem is similer to above one but small difference.

i want to write a bat who can create new instance. below attached code is .vbs code.

once i run below  vbs scriptit tookover existing qv instance.

set Qv = CreateObject("QlikTech.QlikView")
set shell = createobject("wscript.shell")

success = shell.appactivate("Qlikview - [Start Page]")
Set docObj = Qv.OpenDoc("E:\QlikView\test.qvw,3,false)

docObj.Reload
docObj.Save
Set docObj= Nothing
Set Qv= Nothing

My problem is  is there any way to open new instance for any reload.

pkkushwaha
Partner - Contributor II
Partner - Contributor II

Hi All,

My problem is similer to above one but small difference.

i want to write a bat who can create new instance. below attached code is .vbs code.

once i run below  vbs scriptit tookover existing qv instance.

set Qv = CreateObject("QlikTech.QlikView")
set shell = createobject("wscript.shell")

success = shell.appactivate("Qlikview - [Start Page]")
Set docObj = Qv.OpenDoc("E:\QlikView\test.qvw,3,false)

docObj.Reload
docObj.Save
Set docObj= Nothing
Set Qv= Nothing

My problem is  is there any way to open new instance for any reload.

rajni_batra
Specialist
Specialist

can any one suggst me how to create a batch file.

need to reload application on one server and copy it to another server through a batch file. how can i ???

Not applicable
Author

Hi,

can you please screen shot for creating log files in server.

regards

Mahesh T

Not applicable
Author

Hi Ravi:


Thank you very much for your post.


Can you explain the other options?


Like what are /l or /v mean? What else do we have for options?


Thank you very much for your help.


PC

Anonymous
Not applicable
Author

Hi Angel,

Do you know how to set a parameter needed on the reload in a BATCH file?

Do you know if this is possible? Maybe with /v or /p?

Thanks

gandalfgray
Specialist II
Specialist II

The /v switch is for specifying variable values

I don't know a /p switch

/r is the reload switch

I would not use the /l switch in a batch script because that leaves the application open.

An example where the abc.qvw is reloaded with the varoable Myvar set to 123:

qv.exe /r /vMyvar=123 abc.qvw

/r

Reload switch. The document will be opened and the script

reloaded. Thereafter the document will be saved, and QlikView will

close itself.

/rp

The same as above, but with a partial reload.

/l

Load new data. The document will be opened and the script

reloaded. The document will not be saved and QlikView will remain

open.

/lp

The same as above, but with a partial reload.

/v

If this switch is immediately followed by a variable name and an

assignment, the variable will obtain the assigned value before the

script execution starts.

/nodata

Opens the document without variables, table and field data.

/NoSecurity

Overrides QlikView security measures against hostile macros and

scripts embedded in QlikView documents. No warning dialogs

prompting the user to accept potentially harmful code will be

shown.

Anonymous
Not applicable
Author

Thanks i was very helpful.

Now it works!

gandalfgray
Specialist II
Specialist II

there should be no space between /v and your variable

/vvApp_Path=0    is correct

/v vApp_Path=0 is not correct

hope this helps