<?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: [resolved] How to copy files with keeping folder structure ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346540#M113933</link>
    <description>&lt;P&gt;added the job demo which works for your reference&lt;/P&gt;</description>
    <pubDate>Thu, 27 Oct 2022 14:19:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-10-27T14:19:31Z</dc:date>
    <item>
      <title>[resolved] How to copy files with keeping folder structure ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346531#M113924</link>
      <description>Hi,&lt;BR /&gt;&lt;FONT color="#222222"&gt;&lt;FONT face="Helvetica Neue, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="2"&gt;I have a folder structure with files scattered across the folders and I want to copy all files to another destination keeping the folder structure.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#222222"&gt;&lt;FONT face="Helvetica Neue, Helvetica, Arial, sans-serif"&gt;&lt;FONT size="2"&gt;How can I do that ?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Antoine</description>
      <pubDate>Fri, 05 Jun 2015 14:17:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346531#M113924</guid>
      <dc:creator>Fernandez</dc:creator>
      <dc:date>2015-06-05T14:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to copy files with keeping folder structure ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346532#M113925</link>
      <description>This is an interesting question and one that I had very recently. However, it appears to be harder than it actually is. The following will sort this for you as long as every folder of the structure you want to recreate has a file in it. The job will look like below.. 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDt0.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130634i8CFC62058385679C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDt0.png" alt="0683p000009MDt0.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;The tFileList is set up like below..... 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDQd.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138090iF9C9F6C107445E7A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDQd.png" alt="0683p000009MDQd.png" /&gt;&lt;/span&gt;The tFixedFlowInput outputs one column which uses one of the variables from the tFileList.... 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))&lt;/PRE&gt; 
&lt;BR /&gt;The tJavaRow has the following code.... 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;//Get file path&lt;BR /&gt;String fileToCopy = input_row.fileToCopy;&lt;BR /&gt;//Replace back slashes to forward slashes - Windows&lt;BR /&gt;fileToCopy = fileToCopy.replace('\\', '/');&lt;BR /&gt;//Set fileToCopy value&lt;BR /&gt;output_row.fileToCopy = fileToCopy;&lt;BR /&gt;//Replace the start of the path to change it to the new start or root&lt;BR /&gt;String outputPath = fileToCopy.toUpperCase().replaceFirst("C:/TEST", "E:/TEST/NEW_LOCATION");&lt;BR /&gt;//Remove the file name from the path so that only the path is left&lt;BR /&gt;outputPath = outputPath.substring(0, outputPath.lastIndexOf("/"));&lt;BR /&gt;//Output the new file path&lt;BR /&gt;output_row.outputFilePath = outputPath;&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt;In the tFileCopy you need to set the "File Name" as the "fileToCopy" column and the "Desitination directory" as the "outputFilePath" column.&amp;nbsp; 
&lt;BR /&gt;This should do it for you.</description>
      <pubDate>Sat, 06 Jun 2015 17:34:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346532#M113925</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-06T17:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to copy files with keeping folder structure ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346533#M113926</link>
      <description>It's running fine.&lt;BR /&gt;Many thanks.&lt;BR /&gt;Antoine</description>
      <pubDate>Tue, 09 Jun 2015 10:43:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346533#M113926</guid>
      <dc:creator>Fernandez</dc:creator>
      <dc:date>2015-06-09T10:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to copy files with keeping folder structure ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346534#M113927</link>
      <description>&lt;P&gt;Hi I used the above method to copy files from source to target. however files does not copied to destination folder. in tFileCopy i put destination directory as&amp;nbsp;"outputFilePath" and filename as&amp;nbsp;fileToCopy&lt;/P&gt;
&lt;P&gt;please find my&amp;nbsp;source and destination path&lt;/P&gt;
&lt;P&gt;source D:/Documents/SourceDir/Important tables.docx&lt;/P&gt;
&lt;P&gt;destination: D:/DESTDIR&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used same tjava code as given.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;also I tried using context variable for destination directory in context file.&lt;/P&gt;
&lt;P&gt;and kept&amp;nbsp;context.tgtfilepath as destination directory&lt;/P&gt;
&lt;P&gt;context file contains&amp;nbsp; tgtfilepath=D:/DestDir&lt;/P&gt;
&lt;P&gt;It copies the all files into destination folder. however it does not create subfolder at destination as per my source folder. Please help&lt;/P&gt;
&lt;P&gt;in my source i have files like...&lt;/P&gt;
&lt;P&gt;source files:&lt;/P&gt;
&lt;P&gt;D:/Documents/SourceDir/Important tables.docx&lt;/P&gt;
&lt;P&gt;D:/Documents/SourceDir/Other Files/File1.docx&lt;/P&gt;
&lt;P&gt;D:/Documents/SourceDir/VPN Connection/File2.docx&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;aslo i need to check no. of source files and no of target files are same or not? how can i achieve this. please help&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Randepp&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 08:36:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346534#M113927</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-21T08:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to copy files with keeping folder structure ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346535#M113928</link>
      <description>&lt;P&gt;It sounds like you may have been confused by my description. Can you give a screenshot of your job and of your tFileCopy configuration. I believe that maybe you have got the wrong values there.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 17:38:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346535#M113928</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-21T17:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to copy files with keeping folder structure ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346536#M113929</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please find my tfilecopy settings.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 851px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M77j.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156572i130CFCD20B960C63/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M77j.png" alt="0683p000009M77j.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Job executes but does not copy files/ folders from source directory to destination. also i need to copy all subfolders and files inside it to destination folder as it has structured in source (folders / subfolders / files)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If I used &lt;STRONG&gt;copy a directory&lt;/STRONG&gt; option from tfilecopy(above), it works as I required however it copies source directory into destination directory. I need all files/subfolders(files) from source to destination directory with files/subfolders(files) in it.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Randeep&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 08:42:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346536#M113929</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-22T08:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to copy files with keeping folder structure ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346537#M113930</link>
      <description>&lt;P&gt;You've not set the columns correctly.&lt;/P&gt; 
&lt;P&gt;"File Name" should be.....&lt;/P&gt; 
&lt;PRE&gt;row2.fileToCopy&lt;/PRE&gt; 
&lt;P&gt;"Destination directory" should be....&lt;/P&gt; 
&lt;PRE&gt;row2.outputFilePath&lt;/PRE&gt; 
&lt;P&gt;This is assuming that you have configured the column in the tJavaFlex and used the same code as me&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 09:30:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346537#M113930</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-27T09:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to copy files with keeping folder structure ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346538#M113931</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;7 years later, I am dealing with the same issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I have tried to implement the solution, but I do have the following issues:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;fileToCopy cannot be resolved or is not a field&lt;/LI&gt;&lt;LI&gt;outputFilePath cannot be resolved or is not a field&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using TALEND STUDIO V8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 11:45:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346538#M113931</guid>
      <dc:creator>sgoardou1611911472</dc:creator>
      <dc:date>2022-10-20T11:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to copy files with keeping folder structure ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346539#M113932</link>
      <description>&lt;P&gt;fileToCopy and outputFilePath need to be configured in the schema of your tJavaRow component. If you have done this, then they will be available in the next component by using the row name before the column names. So, if your row is "row2" (as in the example above), they will be....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;row2.fileToCopy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...and....&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;row2.outputFilePath&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 13:52:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346539#M113932</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-27T13:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to copy files with keeping folder structure ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346540#M113933</link>
      <description>&lt;P&gt;added the job demo which works for your reference&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 14:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-copy-files-with-keeping-folder-structure/m-p/2346540#M113933</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-27T14:19:31Z</dc:date>
    </item>
  </channel>
</rss>

