<?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] tFileCopy and tFileDelete in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345097#M112672</link>
    <description>I try this :&lt;BR /&gt;context.output+((String)globalMap.get("tFileList_4_CURRENT_FILEDIRECTORY")).substring(context.input.length())&lt;BR /&gt;context.output = "E:/TestASupprimerEnsuite/Out"&lt;BR /&gt;context.input = "E:/TestASupprimerEnsuite/In"&lt;BR /&gt;It works fine.</description>
    <pubDate>Thu, 15 Dec 2011 16:44:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-12-15T16:44:30Z</dc:date>
    <item>
      <title>[resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345077#M112652</link>
      <description>Hello,
&lt;BR /&gt;I try to copy a whole directory (or more) and delete it after.
&lt;BR /&gt;To do this, i use a tFileCopy component and a tFileDelete component. The problem is when i want to do this on large file (&amp;gt;150Mo) it doesn?t delete every file in the directory.
&lt;BR /&gt;I think that the problem comes from the tFileCopy. It doesn?t close the file.
&lt;BR /&gt;Have you any suggestion ?
&lt;BR /&gt;Regards</description>
      <pubDate>Sat, 16 Nov 2024 12:30:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345077#M112652</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345078#M112653</link>
      <description>preatorien,
&lt;BR /&gt;Are you trying to copy files from your source folder to another folder and delete the files in the source folder after they are copied?
&lt;BR /&gt;If so you can use the delete in tFileCopy by enabling "Remove Source File".
&lt;BR /&gt;If not is the filemask correct for all the files in the folder? (in your tFileList2 component)
&lt;BR /&gt;You can try running both steps seperately to look if that makes a difference but I don't think so when using OnSubJobok.
&lt;BR /&gt;
&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 15 Dec 2011 09:28:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345078#M112653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T09:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345079#M112654</link>
      <description>Hi mpa,
&lt;BR /&gt;
&lt;BR /&gt;Yes, i?m trying to copy files from source folder to another folder and delete those from the source folder after they are copied. 
&lt;BR /&gt;I can?t use "Remove Source File" actually because i copy the whole directory not just a file.
&lt;BR /&gt;My tFileList_2 does the same iteration that the first one (with same Filemask). And, it works with little file (under 100Mo).
&lt;BR /&gt;I think the problem comes from tFileCopy because it doesn?t close the file after the copy.
&lt;BR /&gt;I?ve tried something with a tSleep, to see if i could delete manually the file after the tCopy and it doesn?t work, the file is locked until the end of the job. (tFileList --&amp;gt; tFileCopu --&amp;gt; tSleep try to delete files or folder manually, it doesn?t work for big file).
&lt;BR /&gt;Thanks for your answer.</description>
      <pubDate>Thu, 15 Dec 2011 09:49:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345079#M112654</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T09:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345080#M112655</link>
      <description>preatorien,&lt;BR /&gt;Ok I didn't now there was an option "Copy a directory".&lt;BR /&gt;Have u tried running both steps seperately? By Disabling the Delete step and running the first part, when the job is complete run the 2nd step to delete the files by disabling the first two components. If this works it would mean that you are right about the locking part. If it doesn't work it's something else.&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 15 Dec 2011 10:09:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345080#M112655</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T10:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345081#M112656</link>
      <description>Your tFileList doesn't include subdirectories so you can check the remove source file in the tFileCopy.</description>
      <pubDate>Thu, 15 Dec 2011 10:10:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345081#M112656</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2011-12-15T10:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345082#M112657</link>
      <description>mpa --&amp;gt; When i run the both steps seperately, it works. So, yes, i think it's a locking problem, but i don't know how to do to go around this problem. At the moment, i've tried a lot of different solution but nothings work. 
&lt;BR /&gt;Hi janhess, i will try your solution, but, i think that, if i check "include subdirectories", my filemask doesn't work anymore. Actually, i got this problem in a bigger Job, and there is some other constraint. 
&lt;BR /&gt;Thank you.</description>
      <pubDate>Thu, 15 Dec 2011 10:19:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345082#M112657</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T10:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345083#M112658</link>
      <description>Do you have multiple directies? Or just one directory? 
&lt;BR /&gt;If it's one directory you can use file in your tFileList and tFileCopy instead of directory and do the "Remove Source File". If it's not I guess you can't do this option.
&lt;BR /&gt;Maybe creating a second job for the second step helps. Then create a father job doing "CopyJob" -OnSubJobOk-&amp;gt; "DeleteJob".</description>
      <pubDate>Thu, 15 Dec 2011 10:26:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345083#M112658</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T10:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345084#M112659</link>
      <description>I didn't suggest you check the subdirectories. I said that since it was unchecked you could check the Remove Source File in the tFileCopy.</description>
      <pubDate>Thu, 15 Dec 2011 10:30:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345084#M112659</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2011-12-15T10:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345085#M112660</link>
      <description>Sorry janhess, i haven't read your post correctly. So, if i understand, you say that, actually, i can check "remove source File" in the tFileCopy? I try to do this, but, since it's a directory and not a file, tFileCopy is not able to delete it (I got a NullPointerException). 
&lt;BR /&gt;I also try to copy and delete file by file (not the whole directory) and use the "remove source File" option. It works, but it doesn't do what i need. 
&lt;BR /&gt;mpa, i have multiple directory. i have something like this 
&lt;BR /&gt;AAA_date_time 
&lt;BR /&gt;| 
&lt;BR /&gt;---AAA_name.zip 
&lt;BR /&gt;---AAA_name 
&lt;BR /&gt; | 
&lt;BR /&gt; AAA_name.csv 
&lt;BR /&gt;And i can have multiple AAA_date_time directory. I tried to do this in to different job, i got the same problem. I think since the father job is running, the big file are locked, even if i do the copy in one child job and the delete in an other one. And i don't understand why. 
&lt;BR /&gt; 
&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 15 Dec 2011 10:48:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345085#M112660</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T10:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345086#M112661</link>
      <description>Ah in that case have you tried checking the subdirectories box in tFileList? I think this should process everything at the file level.</description>
      <pubDate>Thu, 15 Dec 2011 11:05:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345086#M112661</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2011-12-15T11:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345087#M112662</link>
      <description>janhess, 
&lt;BR /&gt;I tried checking "includes subdirectories", but the problem with this solution is that, in my tFileCopy component i can't copy directories and files. Maybe, i can try to separate the copy of directories and files with two different tFileList and tFileCopy but actually, i don't know how to do this exactly (because, if i want to copy the directories first, files will be copied too, and if i copy files first, i'm not able to retrieve their former directory).</description>
      <pubDate>Thu, 15 Dec 2011 13:08:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345087#M112662</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T13:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345088#M112663</link>
      <description>preatorien, 
&lt;BR /&gt;Put the following in your destination of your tFileCopy: 
&lt;BR /&gt;"DEST FOLDER LOCATION: What you put in your tFileCopy" + StringHandling.RIGHT(((String)globalMap.get("tFileList_1_CURRENT_FILEDIRECTORY")),StringHandling.LEN(((String)globalMap.get("tFileList_1_CURRENT_FILEDIRECTORY")))-StringHandling.LEN("E:\TestAsupprimerEnsuite\In"))+ "/" + ((String)globalMap.get("tFileList_1_CURRENT_FILE")) 
&lt;BR /&gt; 
&lt;BR /&gt;This will do the following: Destination Folder + Subdirectory name + FileName. 
&lt;BR /&gt;Doing this will give you the same directory structure. 
&lt;BR /&gt; 
&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 15 Dec 2011 13:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345088#M112663</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T13:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345089#M112664</link>
      <description>Thank you so much mpa, it works. It?s not a beautiful solution but it works. 
&lt;BR /&gt;I explain my job for those who are interested in. You can see a screenshot of the job in attachment. 
&lt;BR /&gt;tFileList_1 settings : 
&lt;BR /&gt; - Directory : ?E:/TestASupprimerEnsuite/In? 
&lt;BR /&gt; - FileListType : Directories 
&lt;BR /&gt; - FileMask : "AAA*" 
&lt;BR /&gt; Don't check the "includes subdirectories" setting. 
&lt;BR /&gt;tFileList_4 settings : 
&lt;BR /&gt; - Directory : ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) 
&lt;BR /&gt; - FileListType : Files 
&lt;BR /&gt; No Filemask, Check "Includes subdirectories" 
&lt;BR /&gt;tFileCopy_1 settings : 
&lt;BR /&gt; - File Name : ((String)globalMap.get("tFileList_4_CURRENT_FILEPATH")) 
&lt;BR /&gt; - Destination directory : "E:/TestASupprimerEnsuite/Out/"+StringHandling.RIGHT(((String)globalMap.get("tFileList_4_CURRENT_FILEDIRECTORY")),(StringHandling.LEN(((String)globalMap.get("tFileList_4_CURRENT_FILEDIRECTORY")))-28)) 
&lt;BR /&gt; 28 is the length of the directory of tFileList_1, to do this in a beautiful way, you can declare it in context variable. 
&lt;BR /&gt; - Check "Remove source file", "Replace existing file" and "create the directory if it doesn't exist" 
&lt;BR /&gt; - don't check "Copy a directory" 
&lt;BR /&gt;The second part of the job with tFileList_2 and tFileDelete_1 is used to delete the directory (all files are already removed in the tFileCopy component). 
&lt;BR /&gt;tFileLis_2 settings : same as tFileList_1 
&lt;BR /&gt;tFileDelete_1 settings : 
&lt;BR /&gt; - Directory : ((String)globalMap.get("tFileList_2_CURRENT_FILEPATH")) 
&lt;BR /&gt; - Check "Delete Folder" 
&lt;BR /&gt;Thank you mpa.</description>
      <pubDate>Thu, 15 Dec 2011 14:38:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345089#M112664</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T14:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345090#M112665</link>
      <description>preatorien,
&lt;BR /&gt;I don't understand why there are 2 filelists for the copy part, but if it works it's ok I guess :-).
&lt;BR /&gt;Can I ask you a question?
&lt;BR /&gt;How did you upload that image, I have been some time on the forum now but never understood it! I always use 
&lt;IMG src="https://community.qlik.com/" but="" that="" doesn="" /&gt;Regards</description>
      <pubDate>Thu, 15 Dec 2011 14:47:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345090#M112665</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T14:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345091#M112666</link>
      <description>Would it be better to have the output base directory as a context variable - basedirectory and use len(context.basedirectory).
&lt;BR /&gt;eg Destination directory : context.basedirectory+StringHandling.RIGHT(((String)globalMap.get("tFileList_4_CURRENT_FILEDIRECTORY")),(StringHandling.LEN(((String)globalMap.get("tFileList_4_CURRENT_FILEDIRECTORY")))-len(context.basedirectory)))</description>
      <pubDate>Thu, 15 Dec 2011 15:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345091#M112666</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2011-12-15T15:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345092#M112667</link>
      <description>mpa,
&lt;BR /&gt;I need two tFileList because all my files does not match the filemask. If i only use one of them, i lost some files. Anyway, it works. Thank you again.
&lt;BR /&gt;To upload images, i use the "Image upload" option that is available under your message when you post a reply.
&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 15 Dec 2011 15:01:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345092#M112667</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T15:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345093#M112668</link>
      <description>Click Post reply rather than use Quick post.</description>
      <pubDate>Thu, 15 Dec 2011 15:02:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345093#M112668</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2011-12-15T15:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345094#M112669</link>
      <description>preatorien, 
&lt;BR /&gt;I had no idea hehe! After all this time, thanks a lot mate! Will be a lot easier for me to help people on the forums 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Have a nice day, 
&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 15 Dec 2011 15:04:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345094#M112669</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T15:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345095#M112670</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Would it be better to have the output base directory as a context variable - basedirectory and use len(context.basedirectory).&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;You're right janhess, that's what i do in my real job. 
&lt;BR /&gt;Have a nice day and thanks again</description>
      <pubDate>Thu, 15 Dec 2011 15:12:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345095#M112670</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-15T15:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tFileCopy and tFileDelete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345096#M112671</link>
      <description>Would this work?&lt;BR /&gt;context.basedirectory+((String)globalMap.get("tFileList_4_CURRENT_FILEDIRECTORY")).substring(len(context.basedirectory))</description>
      <pubDate>Thu, 15 Dec 2011 16:20:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tFileCopy-and-tFileDelete/m-p/2345096#M112671</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2011-12-15T16:20:38Z</dc:date>
    </item>
  </channel>
</rss>

