3 Replies Latest reply: May 29, 2017 6:27 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