<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Supporting Task - External Program (.bat file) - output? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Supporting-Task-External-Program-bat-file-output/m-p/290424#M1320897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miguel, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;very helpful, thanks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would you happen to know how to determine the name of the logfile generated by the server? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example, the log file name from this morning is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\ProgramData\QlikTech\DistributionService\1\Log\20120119\070000 - ADA003 - Copy QVDs to QlikTest Server\TaskLog.txt &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most of the file name is static.&amp;nbsp; The date and time stamp is variable and will be different for each run.&amp;nbsp; My first thought was to redirect the output in the batch file to the current date/time.&amp;nbsp; But that will only work IF the time elapsed is less than 1 second. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps there is a QV variable available to the batch file?&amp;nbsp; fingers crossed...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jan 2012 16:23:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-01-19T16:23:30Z</dc:date>
    <item>
      <title>Supporting Task - External Program (.bat file) - output?</title>
      <link>https://community.qlik.com/t5/QlikView/Supporting-Task-External-Program-bat-file-output/m-p/290422#M1320895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When a supporting task is triggered, a log file is generated by the QlikView server.&amp;nbsp; Is it possible to write the output of the external program to the same log?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Supporting-Task-External-Program-bat-file-output/m-p/290422#M1320895</guid>
      <dc:creator />
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Supporting Task - External Program (.bat file) - output?</title>
      <link>https://community.qlik.com/t5/QlikView/Supporting-Task-External-Program-bat-file-output/m-p/290423#M1320896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can append the standard output to any file using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Batchfile &amp;gt;&amp;gt; Logfile&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And create the same log format (date, time, and the rest of the fields) so the log keeps the fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QlikView Server stores logs into C:\ProgramData\QlikTech The destination folder will depend on the service -Web Server, Publisher, Server...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;@ECHO OFF&lt;/P&gt;&lt;P&gt;SET COMPLETEDATE=%DATE% %TIME%&lt;/P&gt;&lt;P&gt;ECHO %COMPLETEDATE% Log text here&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will write date, time and "Log text here" into the folder specified after the "&amp;gt;&amp;gt;" when calling the .bat file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;log.bat &amp;gt;&amp;gt; logfile.txt&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 15:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Supporting-Task-External-Program-bat-file-output/m-p/290423#M1320896</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-01-19T15:45:48Z</dc:date>
    </item>
    <item>
      <title>Supporting Task - External Program (.bat file) - output?</title>
      <link>https://community.qlik.com/t5/QlikView/Supporting-Task-External-Program-bat-file-output/m-p/290424#M1320897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miguel, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;very helpful, thanks. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;would you happen to know how to determine the name of the logfile generated by the server? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example, the log file name from this morning is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\ProgramData\QlikTech\DistributionService\1\Log\20120119\070000 - ADA003 - Copy QVDs to QlikTest Server\TaskLog.txt &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most of the file name is static.&amp;nbsp; The date and time stamp is variable and will be different for each run.&amp;nbsp; My first thought was to redirect the output in the batch file to the current date/time.&amp;nbsp; But that will only work IF the time elapsed is less than 1 second. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps there is a QV variable available to the batch file?&amp;nbsp; fingers crossed...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 16:23:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Supporting-Task-External-Program-bat-file-output/m-p/290424#M1320897</guid>
      <dc:creator />
      <dc:date>2012-01-19T16:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Supporting Task - External Program (.bat file) - output?</title>
      <link>https://community.qlik.com/t5/QlikView/Supporting-Task-External-Program-bat-file-output/m-p/290425#M1320898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do yo mean by "QV variable available to the batch file"? I missed that part. The name of the folder is the current date, so that part is just fine with the batch process. The time could be fixed if you have scheduled a reload on a certain time, and not on event of another task. So that part would be ok as well. And the rest of the name is fixed as well. So you need a bit of string formatting in the batch process to look like YYYYMMDD and hhmmss:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;@ECHO OFF&lt;/P&gt;&lt;P&gt;SET VARDATE=%DATE:~6,4%%DATE:~3,2%%DATE:~0,2%&lt;/P&gt;&lt;P&gt;SET VARTIME=%TIME:~0,2%%TIME:~3,2%00&lt;/P&gt;&lt;P&gt;SET TIMESTAMP=%VARDATE% %VARTIME%&lt;/P&gt;&lt;P&gt;ECHO %TIMESTAMP% Log text here&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of this batch should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;20120119 151400 Log text here&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now elaborate the script to change directory to the current date and the name of your file to get the complete file name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 17:20:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Supporting-Task-External-Program-bat-file-output/m-p/290425#M1320898</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-01-19T17:20:26Z</dc:date>
    </item>
    <item>
      <title>Supporting Task - External Program (.bat file) - output?</title>
      <link>https://community.qlik.com/t5/QlikView/Supporting-Task-External-Program-bat-file-output/m-p/290426#M1320900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for you help.&amp;nbsp; It certainly sent me in the right direction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After tweaking the code a bit, I was able to write to a log file in the same location as the TaskLog.txt file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET VARDATE=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%&lt;BR /&gt;SET VARTIME=%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%&lt;BR /&gt;SET TIMESTAMP=%VARDATE% %VARTIME%&lt;BR /&gt;SET LOGFILENAME="C:\ProgramData\QlikTech\DistributionService\1\Log\%VARDATE%\%VARTIME% - ADA003 - Copy QVDs to QlikTest Server\CmdLog.txt"&lt;BR /&gt;ECHO Batch command file execution started... &amp;gt; %LOGFILENAME%&lt;BR /&gt;REM commands removed to protect the innocent, like SOPA supporters...&lt;/P&gt;&lt;P&gt;ECHO Batch command file execution completed...&amp;gt;&amp;gt; %LOGFILENAME%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 18:31:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Supporting-Task-External-Program-bat-file-output/m-p/290426#M1320900</guid>
      <dc:creator />
      <dc:date>2012-01-19T18:31:33Z</dc:date>
    </item>
  </channel>
</rss>

