<?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 How to delete a file that is 5 years old. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-delete-a-file-that-is-5-years-old/m-p/2340698#M108709</link>
    <description>Hi,
&lt;BR /&gt;I would like to ask help on how to delete a file that is 5 years older than its date modified.
&lt;BR /&gt;Date Modified is in a file property
&lt;BR /&gt;example:
&lt;BR /&gt;If a file was created 2007 and it was last modified 2012. then this will be deleted.
&lt;BR /&gt;Since I am not a Java man, i would like to know the script on this on tMAP or tFilterRow.
&lt;BR /&gt;Thanks.</description>
    <pubDate>Sat, 16 Nov 2024 12:20:43 GMT</pubDate>
    <dc:creator>_AnonymousUser</dc:creator>
    <dc:date>2024-11-16T12:20:43Z</dc:date>
    <item>
      <title>How to delete a file that is 5 years old.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-delete-a-file-that-is-5-years-old/m-p/2340698#M108709</link>
      <description>Hi,
&lt;BR /&gt;I would like to ask help on how to delete a file that is 5 years older than its date modified.
&lt;BR /&gt;Date Modified is in a file property
&lt;BR /&gt;example:
&lt;BR /&gt;If a file was created 2007 and it was last modified 2012. then this will be deleted.
&lt;BR /&gt;Since I am not a Java man, i would like to know the script on this on tMAP or tFilterRow.
&lt;BR /&gt;Thanks.</description>
      <pubDate>Sat, 16 Nov 2024 12:20:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-delete-a-file-that-is-5-years-old/m-p/2340698#M108709</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T12:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a file that is 5 years old.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-delete-a-file-that-is-5-years-old/m-p/2340699#M108710</link>
      <description>Hi
&lt;BR /&gt;You can use tFilterRow and check Advanced mode.
&lt;BR /&gt;
&lt;PRE&gt;TalendDate.compareDate(TalendDate.addDate(new Date(input_row.mtime_string),5,"yyyy"),TalendDate.getCurrentDate())==-1&lt;/PRE&gt;
&lt;BR /&gt;tFileProperties--&amp;gt;tFilterRow--&amp;gt;tFileOutputDelimited
&lt;BR /&gt; |
&lt;BR /&gt;OnSubjobOk
&lt;BR /&gt; |
&lt;BR /&gt; tFileInputDelimited--row3--&amp;gt;tLogRow
&lt;BR /&gt; |
&lt;BR /&gt; Iterate
&lt;BR /&gt; |
&lt;BR /&gt;tFileDelete
&lt;BR /&gt;Type row3.abs_path into "File Name" of tFileDelete.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Pedro</description>
      <pubDate>Tue, 28 Feb 2012 03:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-delete-a-file-that-is-5-years-old/m-p/2340699#M108710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-28T03:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete a file that is 5 years old.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-delete-a-file-that-is-5-years-old/m-p/2340700#M108711</link>
      <description>Got it! thanks pedro.</description>
      <pubDate>Tue, 28 Feb 2012 05:40:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-delete-a-file-that-is-5-years-old/m-p/2340700#M108711</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-02-28T05:40:39Z</dc:date>
    </item>
  </channel>
</rss>

