<?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: Dynamically Copy files in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Dynamically-Copy-files/m-p/2231327#M21659</link>
    <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Right now I am using a tForEach component to include the filemasks which are referenced in a tFileList component - ((String)globalMap.get("tForeach_1_CURRENT_VALUE")). This component is then connected to a tFileCopycomponent and I use the filelist component to get the list of files that need to be copied.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Yes, you are creating a right job. If there are different kinds of file, like .csv/.txt, and you want to copy all these kinds of file, you should use a foreach component to iterate all kinds of file. 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;I tried listing the files in a delimited file and tried using this expression to reference it in the tCopy component. I used this expression ((String)globalMap.get("tFileInputDelimited_1_CURRENT_VALUE")) and ((String)globalMap.get("tFileInputDelimited_1.srcfilename")) but both expressions did not work. Is this possible at all or am I limited to using a foreach component to achieve this kind of a task.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;There is not such a global variable: ((String)globalMap.get("tFileInputDelimited_1_CURRENT_VALUE")) 
&lt;BR /&gt;If you want to list all the file path in a delimited file, then iterate them(like you doing in your second post). You can simply create a job as the screenshot. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; 
&lt;BR /&gt; shong 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBjB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132502i5DCF265909A6B6FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBjB.png" alt="0683p000009MBjB.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MC9l.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132557iE1F65C794E009558/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MC9l.png" alt="0683p000009MC9l.png" /&gt;&lt;/span&gt;</description>
    <pubDate>Wed, 07 May 2008 03:37:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-05-07T03:37:52Z</dc:date>
    <item>
      <title>Dynamically Copy files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamically-Copy-files/m-p/2231325#M21657</link>
      <description>Hi I need to copy a few files from one directory to another and the list of files to be copied is determined by the result of a SQL query. 
&lt;BR /&gt;I am writing the result of the query to a file. I want to know if I can reference the contents of the file directly in the tFileCopy component. 
&lt;BR /&gt;Right now I am using a tForEach component to include the filemasks which are referenced in a tFileList component - ((String)globalMap.get("tForeach_1_CURRENT_VALUE")). This component is then connected to a tFileCopycomponent and I use the filelist component to get the list of files that need to be copied. 
&lt;BR /&gt;I want to know if there is a way for me to get the list of files straight from a file rather than going through a foreach component. 
&lt;BR /&gt;I tried listing the files in a delimited file and tried using this expression to reference it in the tCopy component. I used this expression ((String)globalMap.get("tFileInputDelimited_1_CURRENT_VALUE")) and ((String)globalMap.get("tFileInputDelimited_1.srcfilename")) but both expressions did not work. Is this possible at all or am I limited to using a foreach component to achieve this kind of a task. 
&lt;BR /&gt;Thanks 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBwZ.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131870iF9D1CE4E1F787F19/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBwZ.jpg" alt="0683p000009MBwZ.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M810.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151804i855B2E1427AEAF57/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M810.jpg" alt="0683p000009M810.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBZo.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152302iBFE758EA718C3308/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBZo.jpg" alt="0683p000009MBZo.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MC9W.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153233i8731870CB180589F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MC9W.jpg" alt="0683p000009MC9W.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Sat, 16 Nov 2024 14:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamically-Copy-files/m-p/2231325#M21657</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Copy files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamically-Copy-files/m-p/2231326#M21658</link>
      <description>I haven't been able to resolve my problem and I need some help. 
&lt;BR /&gt;I have an input file which has a header and a row with the details of the file. The data in the file is as below. 
&lt;BR /&gt;sourcefilename 
&lt;BR /&gt;D:/Lnx/Talend/TOS-All-r11699-V2.3.1/TOS-All-r11699-V2.3.1/workspace/out.txt 
&lt;BR /&gt;I added a flow to iterate component and connected it to a tfilecopy. However I run into this error when I try this. 
&lt;BR /&gt;Exception in component tFileCopy_2 
&lt;BR /&gt;java.lang.NullPointerException 
&lt;BR /&gt; at java.io.File.&amp;lt;init&amp;gt;(Unknown Source) 
&lt;BR /&gt; at first.dummy.dummy.tFileInputDelimited_1Process(dummy.java:232) 
&lt;BR /&gt; at first.dummy.dummy.runJobInTOS(dummy.java:423) 
&lt;BR /&gt; at first.dummy.dummy.main(dummy.java:342) 
&lt;BR /&gt;Job dummy ended at 12:51 06/05/2008. 
&lt;BR /&gt;Please find attached screenshots of the components. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MC9b.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132693i9235FEB77A1329ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MC9b.jpg" alt="0683p000009MC9b.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MC1G.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153542i3D71410764C89099/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MC1G.jpg" alt="0683p000009MC1G.jpg" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MC9g.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139095iF11BEECA78BB7F2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MC9g.jpg" alt="0683p000009MC9g.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 06 May 2008 20:54:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamically-Copy-files/m-p/2231326#M21658</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-05-06T20:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Copy files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamically-Copy-files/m-p/2231327#M21659</link>
      <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Right now I am using a tForEach component to include the filemasks which are referenced in a tFileList component - ((String)globalMap.get("tForeach_1_CURRENT_VALUE")). This component is then connected to a tFileCopycomponent and I use the filelist component to get the list of files that need to be copied.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Yes, you are creating a right job. If there are different kinds of file, like .csv/.txt, and you want to copy all these kinds of file, you should use a foreach component to iterate all kinds of file. 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;I tried listing the files in a delimited file and tried using this expression to reference it in the tCopy component. I used this expression ((String)globalMap.get("tFileInputDelimited_1_CURRENT_VALUE")) and ((String)globalMap.get("tFileInputDelimited_1.srcfilename")) but both expressions did not work. Is this possible at all or am I limited to using a foreach component to achieve this kind of a task.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;There is not such a global variable: ((String)globalMap.get("tFileInputDelimited_1_CURRENT_VALUE")) 
&lt;BR /&gt;If you want to list all the file path in a delimited file, then iterate them(like you doing in your second post). You can simply create a job as the screenshot. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; 
&lt;BR /&gt; shong 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MBjB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132502i5DCF265909A6B6FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MBjB.png" alt="0683p000009MBjB.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MC9l.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/132557iE1F65C794E009558/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MC9l.png" alt="0683p000009MC9l.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Wed, 07 May 2008 03:37:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamically-Copy-files/m-p/2231327#M21659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-05-07T03:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Copy files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamically-Copy-files/m-p/2231328#M21660</link>
      <description>Thanks a lot.  I just saw your hint about using ctrl+space in text fields in another post and it is really helpful.</description>
      <pubDate>Wed, 07 May 2008 06:32:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamically-Copy-files/m-p/2231328#M21660</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-05-07T06:32:13Z</dc:date>
    </item>
  </channel>
</rss>

