<?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 File List - File properties in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269929#M47996</link>
    <description>&lt;BR /&gt;In a pre set directory loop through the files and delete those that are older than 2 minutes.
&lt;BR /&gt;
&lt;BR /&gt;Processing the contents of a directory was done using the tFileList step. However, it seems that it only retrieves the File Path of a file and not any of the other properties associated with a file like Size, Created Date, Last Changed etc.
&lt;BR /&gt;Searched the help file, forum and tutorials for the keywords file, time and date. Sadly to no avail.
&lt;BR /&gt;Now, I probably think that this can be done within TOS, but will require some custom code, ie. Java Step but I was wondering if there was a different way of doing it. Sadly I don't have the programming skills to create this kind of functionality. 
&lt;BR /&gt;Any help will be appreciated. 
&lt;BR /&gt;Regards,</description>
    <pubDate>Sat, 16 Nov 2024 14:25:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T14:25:41Z</dc:date>
    <item>
      <title>File List - File properties</title>
      <link>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269929#M47996</link>
      <description>&lt;BR /&gt;In a pre set directory loop through the files and delete those that are older than 2 minutes.
&lt;BR /&gt;
&lt;BR /&gt;Processing the contents of a directory was done using the tFileList step. However, it seems that it only retrieves the File Path of a file and not any of the other properties associated with a file like Size, Created Date, Last Changed etc.
&lt;BR /&gt;Searched the help file, forum and tutorials for the keywords file, time and date. Sadly to no avail.
&lt;BR /&gt;Now, I probably think that this can be done within TOS, but will require some custom code, ie. Java Step but I was wondering if there was a different way of doing it. Sadly I don't have the programming skills to create this kind of functionality. 
&lt;BR /&gt;Any help will be appreciated. 
&lt;BR /&gt;Regards,</description>
      <pubDate>Sat, 16 Nov 2024 14:25:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269929#M47996</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: File List - File properties</title>
      <link>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269930#M47997</link>
      <description>Hi, 
&lt;BR /&gt;you can use the following "hack" to get more information about the file in a tJava component after a tFileList. Change variablenames if necessary. 
&lt;BR /&gt; 
&lt;PRE&gt;System.out.print(files_tFileList_1.getName() + ": ");&lt;BR /&gt;System.out.print(files_tFileList_1.length() + "\n");&lt;/PRE&gt; 
&lt;BR /&gt;Hack, because I use a internal variable of tFileList, this may be changed in a future version. 
&lt;BR /&gt;Actual there is no Java (standard) method to get the create time of a file. 
&lt;BR /&gt;Bye 
&lt;BR /&gt;Volker</description>
      <pubDate>Sat, 15 Mar 2008 22:15:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269930#M47997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-15T22:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: File List - File properties</title>
      <link>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269931#M47998</link>
      <description>I think you can be interested in 984 (one year old and suspended but can be reactivated). I thought creating a specific component that would output all data (filemtime, size, owner, ...) into a data flow (a row link) and you suggest to have it in tFileList global variables.
&lt;BR /&gt;I do still prefer the dedicated tFileProperties dedicated component because you can be interested in file properties outside tFileList. Imagin you have your file list in a database table.
&lt;BR /&gt;I encourage you to add a note in this feature request and monitor it so that we're aware some users need it.</description>
      <pubDate>Sun, 16 Mar 2008 15:47:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269931#M47998</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-16T15:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: File List - File properties</title>
      <link>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269932#M47999</link>
      <description>Thanks for the suggestion; sadly the file date is the most important one at present. That said, I do feel that all the other file properties will have a use as well. In this case a message has to go out if a file is older than a particular date. Granted, it's not really ETL but since the file object is already part of TOS I had thought that the extension of the file step or addition of the properties step would be appropriate. 
&lt;BR /&gt;Kind regards,
&lt;BR /&gt;Anne.</description>
      <pubDate>Tue, 18 Mar 2008 12:44:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269932#M47999</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-18T12:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: File List - File properties</title>
      <link>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269933#M48000</link>
      <description>Sorry, my answer was not precise enough. The variable tFiles_tFileList_l is of type java.io.file. So you can use additional methods on this object. For example: long lastModifed().
&lt;BR /&gt;More information can be found in the api: 
&lt;A href="http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html" rel="nofollow noopener noreferrer"&gt;http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html&lt;/A&gt;</description>
      <pubDate>Tue, 18 Mar 2008 21:49:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269933#M48000</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-18T21:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: File List - File properties</title>
      <link>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269934#M48001</link>
      <description>Volker, thanks for this comment. This is indeed something I might be able to process further down the road. It is indeed a work around and it will have to be documented as such. In any case, it will allow me to do a few things that are on the fringe of ETL with the same tool. Will give this a go on my other notebook in the next couple of days. 
&lt;BR /&gt;Again, thanks for helping out.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Anne.</description>
      <pubDate>Wed, 19 Mar 2008 20:53:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269934#M48001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-19T20:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: File List - File properties</title>
      <link>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269935#M48002</link>
      <description>Just for those interested in what I ended up doing was to add a 
&lt;B&gt;tJavaStep&lt;/B&gt; after the the 
&lt;B&gt;tFileList&lt;/B&gt; step and added the following line of code: 
&lt;BR /&gt; 
&lt;PRE&gt;globalMap.put("tFileList_1_CURRENT_FILEDATE", files_tFileList_1.lastModified());&lt;/PRE&gt; 
&lt;BR /&gt;After this I added an 
&lt;B&gt;tIteratToFlow&lt;/B&gt; step with a colum called 
&lt;I&gt;Date&lt;/I&gt; and filled it with the following statement: 
&lt;BR /&gt; 
&lt;PRE&gt;((Long)globalMap.get("tFileList_1_CURRENT_FILEDATE"))&lt;/PRE&gt; 
&lt;BR /&gt;This will result in the 
&lt;I&gt;Date&lt;/I&gt; field being populated with a long number which represents a the date in milliseconds after 1970. This date can then be used to do all sorts of comparison and calculations. 
&lt;BR /&gt;Again, thanks for responding so quickly and for all the useful information you have provided me.</description>
      <pubDate>Sat, 22 Mar 2008 23:20:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/File-List-File-properties/m-p/2269935#M48002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-03-22T23:20:56Z</dc:date>
    </item>
  </channel>
</rss>

