<?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 tFTPDelete -  Is it NOT possible to delete all files (from the server) but still keep the folder? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tFTPDelete-Is-it-NOT-possible-to-delete-all-files-from-the/m-p/2286341#M59963</link>
    <description>&lt;P&gt;I wanted to delete the files from a remote folder and I used the tFTPDelete component. Here is the configuration for it:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0914.PNG" style="width: 562px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M09W.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145560iDC8BA7C9221CCCB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M09W.png" alt="0683p000009M09W.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Basically, I wanted to empty this folder but KEEP the folder still. Initially, I put "*" on filemask and the job failed, and below is the error code:&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2" color="#FF0000"&gt;Exception in component tFTPDelete_3 (movefiles)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#FF0000"&gt;24: This request cannot be used to remove a directory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#FF0000"&gt;at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2846)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#FF0000"&gt;at com.jcraft.jsch.ChannelSftp.rm(ChannelSftp.java:1958)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Then I put a new filemask ( shown above), all the files match that pattern except one .zip file. I ran the job again and the files were deleted, only .zip was left in the folder.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#FF0000"&gt;BTW, both times the Target Type was "File".&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am thinking - does tFTPDelete not allow us to empty a folder if we choose "File" as Target Type?&lt;/P&gt;</description>
    <pubDate>Fri, 14 Sep 2018 20:57:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-09-14T20:57:24Z</dc:date>
    <item>
      <title>tFTPDelete -  Is it NOT possible to delete all files (from the server) but still keep the folder?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFTPDelete-Is-it-NOT-possible-to-delete-all-files-from-the/m-p/2286341#M59963</link>
      <description>&lt;P&gt;I wanted to delete the files from a remote folder and I used the tFTPDelete component. Here is the configuration for it:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0914.PNG" style="width: 562px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M09W.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145560iDC8BA7C9221CCCB5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M09W.png" alt="0683p000009M09W.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Basically, I wanted to empty this folder but KEEP the folder still. Initially, I put "*" on filemask and the job failed, and below is the error code:&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2" color="#FF0000"&gt;Exception in component tFTPDelete_3 (movefiles)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#FF0000"&gt;24: This request cannot be used to remove a directory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#FF0000"&gt;at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2846)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#FF0000"&gt;at com.jcraft.jsch.ChannelSftp.rm(ChannelSftp.java:1958)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Then I put a new filemask ( shown above), all the files match that pattern except one .zip file. I ran the job again and the files were deleted, only .zip was left in the folder.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#FF0000"&gt;BTW, both times the Target Type was "File".&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am thinking - does tFTPDelete not allow us to empty a folder if we choose "File" as Target Type?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 20:57:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFTPDelete-Is-it-NOT-possible-to-delete-all-files-from-the/m-p/2286341#M59963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-14T20:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: tFTPDelete -  Is it NOT possible to delete all files (from the server) but still keep the folder?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFTPDelete-Is-it-NOT-possible-to-delete-all-files-from-the/m-p/2286342#M59964</link>
      <description>You're right -- the Target Type will control what jsch method will be called ( ChannelSftp.rm() for files and ChannelSftp.rmdir() for directories ).
&lt;BR /&gt;
&lt;BR /&gt;you may find some success with this approach:
&lt;BR /&gt;first attempt to delete all the files. uncheck die on error in the first tFTPDelete component. connect another tFTPDelete with a onComponentError connector and then try to delete the directories.</description>
      <pubDate>Fri, 14 Sep 2018 21:23:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFTPDelete-Is-it-NOT-possible-to-delete-all-files-from-the/m-p/2286342#M59964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-14T21:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: tFTPDelete -  Is it NOT possible to delete all files (from the server) but still keep the folder?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFTPDelete-Is-it-NOT-possible-to-delete-all-files-from-the/m-p/2286343#M59965</link>
      <description>&lt;P&gt;JGM,&lt;/P&gt; 
&lt;P&gt;Thanks for your quick response, here is what I observed:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1.&amp;nbsp;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0914-1.PNG" style="width: 219px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lzsa.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131560iAEA925783C2EA28F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lzsa.png" alt="0683p000009Lzsa.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Even though "Die on error" was unticked, the job still wouldn't run, it would just stop:&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2" color="#FF0000"&gt;This request cannot be used to remove a directory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;[statistics] disconnected&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3"&gt;2. Only one component is needed to delete the files and directory:&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0914-2.PNG" style="width: 219px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M0GM.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152335i53DB307F22F2E77E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M0GM.png" alt="0683p000009M0GM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My question still is :&amp;nbsp; how to delete the files and still keep the folder on remote server? Is that possible?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 21:37:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFTPDelete-Is-it-NOT-possible-to-delete-all-files-from-the/m-p/2286343#M59965</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-14T21:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: tFTPDelete -  Is it NOT possible to delete all files (from the server) but still keep the folder?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFTPDelete-Is-it-NOT-possible-to-delete-all-files-from-the/m-p/2286344#M59966</link>
      <description>&lt;P&gt;I think I get the answer to my own question.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133049iD780B7DE0116E4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACJ.png" alt="0683p000009MACJ.png" /&gt;&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If I want to delete all the files from a folder but still keep the directory, I will need to use specific file mask(s) which would delete all the files, but the file mask shouldn't be "*".&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT color="#0000FF"&gt;For example, if I have below files in a folder, I should use file mask "Testfile_*" and "file_*" to delete all the files.&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;Testfile_001.xlsm&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;Testfile_002.xlsm&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;file_001.xlsm&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;file_002.xlsm&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;&lt;FONT size="3" color="#000000"&gt;As long as&amp;nbsp; specific file mask(s) is used to delete all the files, it doesn't matter Target Type is "File" or "Directory", it would only delete the files and always keep the directory.&lt;/FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;&lt;FONT size="3" color="#000000"&gt;Only the file mask "*" + Target Type "Directory" combination would delete the directory.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2018 22:48:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFTPDelete-Is-it-NOT-possible-to-delete-all-files-from-the/m-p/2286344#M59966</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-24T22:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: tFTPDelete -  Is it NOT possible to delete all files (from the server) but still keep the folder?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFTPDelete-Is-it-NOT-possible-to-delete-all-files-from-the/m-p/2286345#M59967</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLACAA4"&gt;@Moe&lt;/A&gt;,yes you can use the data mask from the tFTPList.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tFTPList--Iterate--&amp;gt;tFTPDelete and use the global parameter from FTPList in FTPDelete.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 06:16:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFTPDelete-Is-it-NOT-possible-to-delete-all-files-from-the/m-p/2286345#M59967</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2018-09-25T06:16:56Z</dc:date>
    </item>
  </channel>
</rss>

