<?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 Disk Space in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Disk-Space/m-p/2286517#M60139</link>
    <description>&lt;P&gt;Hi Team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using Talend Job i want to find out what is free disk space available in in PC&lt;/P&gt;&lt;P&gt;I cmd prompt&amp;nbsp; in have used the following command to get it&amp;nbsp;&lt;SPAN&gt;dir c:\&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When i execute the same in tsystem component i am getting the path of&amp;nbsp; Talend root directory&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is their any to find it out&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help me a bit urgent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks In advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Saranya&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 15 Sep 2018 18:36:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-09-15T18:36:08Z</dc:date>
    <item>
      <title>Disk Space</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Disk-Space/m-p/2286517#M60139</link>
      <description>&lt;P&gt;Hi Team&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using Talend Job i want to find out what is free disk space available in in PC&lt;/P&gt;&lt;P&gt;I cmd prompt&amp;nbsp; in have used the following command to get it&amp;nbsp;&lt;SPAN&gt;dir c:\&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When i execute the same in tsystem component i am getting the path of&amp;nbsp; Talend root directory&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is their any to find it out&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help me a bit urgent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks In advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Saranya&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 18:36:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Disk-Space/m-p/2286517#M60139</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-15T18:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Disk Space</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Disk-Space/m-p/2286518#M60140</link>
      <description>&lt;P&gt;I always the tSystem quite cumbersome so only use it when I really have to. In this case, you can actually use a simple bit of Java to get this. Have a play around with the following code in a tJava to see how it works, then move it to a tJavaFlex to return the data in a row....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Imports&lt;/P&gt; 
&lt;PRE&gt;import java.text.NumberFormat;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.FileStore;
import java.nio.file.Path;
import java.io.IOException;&lt;/PRE&gt; 
&lt;P&gt;Code&lt;/P&gt; 
&lt;PRE&gt;NumberFormat nf = NumberFormat.getNumberInstance();
for (Path root : FileSystems.getDefault().getRootDirectories()) {

    System.out.print(root + ": ");
    try {
        FileStore store = Files.getFileStore(root);
        System.out.println("available=" + nf.format(store.getUsableSpace())
                            + ", total=" + nf.format(store.getTotalSpace()));
    } catch (IOException e) {
        System.out.println("error querying space: " + e.toString());
    }
}&lt;/PRE&gt; 
&lt;P&gt;FYI I borrowed this code from here (&lt;A href="https://stackoverflow.com/questions/1051295/how-to-find-how-much-disk-space-is-left-using-java" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/1051295/how-to-find-how-much-disk-space-is-left-using-java&lt;/A&gt;). In order to use it in a tJavaFlex, put the code up to the start of the for loop in the Start Code, the rest (apart from the last "}") in the Main Code and the last "}" in the End Code. You can return your disk space data in the Main Code section by creating columns to do this.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 19:43:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Disk-Space/m-p/2286518#M60140</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-15T19:43:20Z</dc:date>
    </item>
  </channel>
</rss>

