18 Replies Latest reply: Nov 4, 2014 11:30 AM by GandalfGray RSS

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

  • Re: How to create a batch file
    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

    • How to create a batch file

      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.

    • Re: How to create a batch file
      Rajni Batra

      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 ???

    • Re: How to create a batch file
      Carlos Casals

      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

      • Re: How to create a batch file
        GandalfGray

        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.

  • How to create a batch file
    Pradeep Kushwaha

    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.

  • How to create a batch file
    Pradeep Kushwaha

    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.