Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Avantika,

For batch file do you mean a Windows batch file? If so, is it going to be read from QlikView? Or do you mean you want to create a batch file to schedule a task to reload a QlikView file that reads from a third file? In this case, the answer is put this line (modified if any according to your folders) in an empty .BAT file

"C:\Program Files\QlikView10\qv.exe" /r "C:\File.qvw"

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

31 Replies
Miguel_Angel_Baeyens

Hi Avantika,

For batch file do you mean a Windows batch file? If so, is it going to be read from QlikView? Or do you mean you want to create a batch file to schedule a task to reload a QlikView file that reads from a third file? In this case, the answer is put this line (modified if any according to your folders) in an empty .BAT file

"C:\Program Files\QlikView10\qv.exe" /r "C:\File.qvw"

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hi Miguel

I am not sure about Windows batch file, but yes I want to create a batch file to schedule a task to reload a QlikView file that reads 'file.txt' file.

I have installed 'Grep for Windows', used for file downloading log monitoring. From this I want to read logs & display them in a report. Report will contain details like  username, his/her ID, name of the application he/she has accessed etc.

Miguel_Angel_Baeyens

Hi,

I'm afraid I'm not getting your requirement right. If you already have QlikView Server, then create the task using the QlikView Enterprise Management Console, going to the Documents tab, clicking on each document you want to reload and setting it up in the right pane, Reload tab.

If you don't have QlikView Server, the line in the post above will do. Then use the Windows Scheduler to perform the reload. But I don't see the relation that Grep for Windows has to all the above. QlikView Server generates several logs you can configure using the QEMC in System, Setup, QlikView Servers, Logging tab and System, Setup, QlikView Web Servers, General. In addition, you can create a log for each file to control the reload process, from within the open document in QlikView Desktop, Settings, Document Properties, Genearl tab, Generate Logfile and usually, Timestamp in logfile name.

Check anyway this QlikView that analyzes the logs above and see if that helps.

But if all the above is wrong or is not what you were looking for, please specify what do you already have built, what do you want, some examples you have seen in the QlikView portal and so.

Regards.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hi Miguel

Sorry for the confusion. I want to create a Window batch file & want to schedule it on daily basis so that everyday I'll get a fresh data.

Regards

Avatnika

Miguel_Angel_Baeyens

Hi Avatnika,

Then my first reply is fine. Just put that line, changed as you need, in a .BAT file. Then go to the Windows Scheduler and create a new task that executes this BAT file and you are done.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Not applicable
Author

Hi Miguel

Thnaks for the reply..!!! but what is the procedure for creating a BAT file?

I understood that I need to write following in BAT file :

"C:\Program Files\QlikView10\qv.exe" /r "C:\File.qvw"

Br

Avantika

Not applicable
Author

Hi ,

                      Mentioned above script is procedue for creating batch file.

Regards,

Ravi.

Not applicable
Author

Thnaks Ravi, but Could you please explain the process? so that I won't commit any mistake

Regards

Avantika

Not applicable
Author

Hi Avantika,

Take a notepad and save it as .bat in that mention below script, But ensure..you have given proper extension of the file or not.

""C:\Program Files\QlikView10\qv.exe" /r "C:\File.qvw""

  Process is nothing but the first part willl open the instance of the Qlikview

, /r for reload (other options are /l./v..etc) and third part is qlikview application which is in mentioned path.

Regards,

Ravi.