9 Replies Latest reply: Oct 13, 2017 5:17 AM by vivek sm RSS

    Qliksense using batch file

    vivek sm

      Hello,

      I have requirement that is the housekeeping requirement using qliksense and batch file script,the stored QVD's should be deleted

      But the condition is shouldn't delete the last 2 months Monday qvd and last week 5 days(Mon-fri) qvds

      Can you give me some solutions for this requirement

        • Re: Qliksense using batch file
          Fernando Keuroglian

          Hi vivek

           

          The question is how to call a batch file or how will be the process in general?

           

          You have to do is:

           

          1) Create a qvf that load the qvd and all unless 2 months

          2)Create a bat that call qvf 1)

          3)when you want to call the bat created in 2)?? in another part of qvf in the script? in a specific period?

           

          Please explain a little more to be easier to help you

           

          Fernando K.

          • Re: Qliksense using batch file
            vivek sm

            Hello all,

            Using FORFILES i have achieved the requirement

            ECHO

            FORFILES -p %QLIKPATH% /M *.qvd /C "cmd /c  for /f %%i in ('powershell ^(Get-Date @fdate -f ddd^)') do if not %%i == Mon echo @file" /D -%DAYSAGO%      >> D:\log.txt 2>&1

            Delete

            FORFILES -p %QLIKPATH% /M *.qvd /C "cmd /c for /f %%i in ('powershell ^(Get-Date @fdate -f ddd^)') do if not %%i == Mon del @path " /D -%DAYSAGO%       >> D:\log.txt 2>&1

              • Re: Qliksense using batch file
                scott wang

                Hi,

                Could you tell me how to call a bat file In QlikSense ?I want to click something then trigger the bat file in QS.

                Thanks

                  • Re: Qliksense using batch file
                    vivek sm

                    Hi,

                    LET vExeLine = 'B:\Qlik\Scripts\foldername\run.bat' ;

                    execute cmd /C $(vExeLine);

                      • Re: Qliksense using batch file
                        scott wang

                        Hi ,

                        this must execute in the script ?

                        My requirement is : in the sense hub interface ,I want to click a button and then trigger the bat , not  reload the script again.

                        Thanks

                          • Re: Qliksense using batch file
                            vivek sm

                            Hi,

                            Yes that should be executed in script, we can create a Trigger button in qliksense itseems,

                            so we should use in script or else we can write a extensions

                              • Re: Qliksense using batch file
                                scott wang

                                So if I want to pass variable to the bat file.The variable is my current selection? And other question:my script has many many lines,if I created a trigger to execute bat file by the script,then can I just execute the specified partial script? I not want to execute many many lines,need a lot of time.

                                 

                                 

                                在2017年10月13日 16:39:59, "vivek sm" <qcwebmaster@qlikview.com> 写道:

                                 

                                 

                                |

                                |

                                |

                                |

                                |

                                 

                                 

                                 

                                 

                                Qliksense using batch file

                                 

                                reply from vivek sm in New to Qlik Sense - View the full discussion

                                 

                                Hi,

                                 

                                Yes that should be executed in script, we can create a Trigger button in qliksense itseems,

                                 

                                so we should use in script or else we can write a extensions

                                 

                                Reply to this message by replying to this email, or go to the message on Qlik Community

                                Start a new discussion in New to Qlik Sense by email or at Qlik Community

                                Following Qliksense using batch file in these streams: Inbox

                                |

                                 

                                |

                                 

                                © 1993-2016 QlikTech International AB | Copyright & Trademarks | Privacy | Terms of Use | Software EULA