<?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 Re: tFileArchive not working as expected in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214892#M11543</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLraAAG"&gt;@aranax&lt;/A&gt;&amp;nbsp;your solution did not work but that did give me an idea which worked!&lt;/P&gt; 
&lt;P&gt;I used the following string in the filemask&lt;/P&gt; 
&lt;P&gt;"VC_" + context.source_filename.replace(".zip",".csv").replace("(","\\(").replace(")","\\)")&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2017 09:27:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-04-20T09:27:43Z</dc:date>
    <item>
      <title>tFileArchive not working as expected</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214886#M11537</link>
      <description>&lt;P&gt;I have just observed a weird behavior of the tFileArchive component. If the name of the archive file's name contains a space followed by '(#)' where # is a number then the component does not create the archive file.&lt;/P&gt; 
&lt;P&gt;Below is the test job I have created&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tFileArchiveJob.JPG" style="width: 495px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LuH0.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148257iF480D7944016E36C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LuH0.jpg" alt="0683p000009LuH0.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;In this job I have context variables source_filename and destination_filename.&lt;/P&gt; 
&lt;P&gt;The destination_filename is set based on the source_filename as follows:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EmptyPlaceholder_Properties.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lu2P.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153700i40516E80D28057D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lu2P.jpg" alt="0683p000009Lu2P.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Then the tFileArchive component's properties are set as follows:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tFileArchive_Properties.JPG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lu84.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135992i739224104461C7EC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lu84.jpg" alt="0683p000009Lu84.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Before&amp;nbsp;the job is executed, if I set the name of the context variable source_filename as "archive.zip", then the destination zip file gets created correctly.&lt;/P&gt; 
&lt;P&gt;However if I set the source_filename as "archive (1).zip", the job executes successfully but no destination zip file is created. Also no error messages are generated.&lt;/P&gt; 
&lt;P&gt;Can anyone help me out with this issue?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 12:12:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214886#M11537</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-19T12:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: tFileArchive not working as expected</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214887#M11538</link>
      <description>&lt;P&gt;You are using your source_filename context variable as part of your filemask. &amp;nbsp;If no files match the filemask, no archive is created.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 14:30:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214887#M11538</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2017-04-19T14:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: tFileArchive not working as expected</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214888#M11539</link>
      <description>&lt;P&gt;The file mask&amp;nbsp;of tFileArchive is most likely considering the "(1)" as a regex and after evaluation&amp;nbsp;is not able to find the file.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 15:11:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214888#M11539</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-19T15:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: tFileArchive not working as expected</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214889#M11540</link>
      <description>&lt;P&gt;Yes, this is exactly what is happening. Is there a way to tell Talend to ignore the "(" and ")" as special characters?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 15:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214889#M11540</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-19T15:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: tFileArchive not working as expected</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214890#M11541</link>
      <description>&lt;P&gt;You would have to check the string for special characters and escape them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;According to some searches, you can escape an entire string by wrapping it in \Q...\E.&lt;/P&gt;
&lt;P&gt;e.g. "\\Q"+context.source_filename +"\\E"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit2:&lt;/P&gt;
&lt;P&gt;I just tested this, and it doesn't work.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 16:15:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214890#M11541</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2017-04-19T16:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: tFileArchive not working as expected</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214891#M11542</link>
      <description>&lt;P&gt;I'm not very good at regex&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but&lt;/P&gt;
&lt;P&gt;"CV_"+context.filename.replace(".zip","")+"\\([0-9]\\)"+".zip".replace(".zip",".csv")&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;will work in the file mask&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;using proper regex &amp;nbsp;pattern it is possible to&amp;nbsp;have the entire string inside a single string ,I'll look into it later if someone hasn't already replied&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 16:26:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214891#M11542</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-19T16:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: tFileArchive not working as expected</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214892#M11543</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLraAAG"&gt;@aranax&lt;/A&gt;&amp;nbsp;your solution did not work but that did give me an idea which worked!&lt;/P&gt; 
&lt;P&gt;I used the following string in the filemask&lt;/P&gt; 
&lt;P&gt;"VC_" + context.source_filename.replace(".zip",".csv").replace("(","\\(").replace(")","\\)")&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 09:27:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileArchive-not-working-as-expected/m-p/2214892#M11543</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-04-20T09:27:43Z</dc:date>
    </item>
  </channel>
</rss>

