<?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: using of tSCPFileExists in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/using-of-tSCPFileExists/m-p/2370392#M133441</link>
    <description>Hallo, 
&lt;BR /&gt;I am hoping that there is someone in this forum who can help me and has the resolution for the problem. 
&lt;BR /&gt;I use TIS 4.2.1. 
&lt;BR /&gt;When I use the component "tFileExist" I can use the boolean global variable "tFileExist_n_EXISTS" with the result of the check in an IF-Link to other components. This is very easy. 
&lt;BR /&gt;But, when I use "tSCPFileExists" to check files on a remote server i can't find a global boolean variable like "tSCPFileExist_n_EXISTS" with the result of the check. I only see the global variables for Error_Message, Filename and Status. 
&lt;BR /&gt;What i have to do to get the result of the check? 
&lt;BR /&gt;Thanks.</description>
    <pubDate>Mon, 10 Oct 2011 08:09:00 GMT</pubDate>
    <dc:creator>gsta02</dc:creator>
    <dc:date>2011-10-10T08:09:00Z</dc:date>
    <item>
      <title>using of tSCPFileExists</title>
      <link>https://community.qlik.com/t5/Talend-Studio/using-of-tSCPFileExists/m-p/2370391#M133440</link>
      <description>Hallo, 
&lt;BR /&gt;I want to use the component tSCPFileExists to check an existing file on a remote server before downloading some other files. I can't find any boolean global var with the result of checking. There are only the global var for Error_Message, Filename and Status. How can I use this component?</description>
      <pubDate>Sat, 16 Nov 2024 12:38:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/using-of-tSCPFileExists/m-p/2370391#M133440</guid>
      <dc:creator>gsta02</dc:creator>
      <dc:date>2024-11-16T12:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: using of tSCPFileExists</title>
      <link>https://community.qlik.com/t5/Talend-Studio/using-of-tSCPFileExists/m-p/2370392#M133441</link>
      <description>Hallo, 
&lt;BR /&gt;I am hoping that there is someone in this forum who can help me and has the resolution for the problem. 
&lt;BR /&gt;I use TIS 4.2.1. 
&lt;BR /&gt;When I use the component "tFileExist" I can use the boolean global variable "tFileExist_n_EXISTS" with the result of the check in an IF-Link to other components. This is very easy. 
&lt;BR /&gt;But, when I use "tSCPFileExists" to check files on a remote server i can't find a global boolean variable like "tSCPFileExist_n_EXISTS" with the result of the check. I only see the global variables for Error_Message, Filename and Status. 
&lt;BR /&gt;What i have to do to get the result of the check? 
&lt;BR /&gt;Thanks.</description>
      <pubDate>Mon, 10 Oct 2011 08:09:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/using-of-tSCPFileExists/m-p/2370392#M133441</guid>
      <dc:creator>gsta02</dc:creator>
      <dc:date>2011-10-10T08:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: using of tSCPFileExists</title>
      <link>https://community.qlik.com/t5/Talend-Studio/using-of-tSCPFileExists/m-p/2370393#M133442</link>
      <description>Hi,&lt;BR /&gt;I think you have a point here. Both components perform a similar action, but return the result in a different way.&lt;BR /&gt;tFileExists uses the following code to set tFileExists_n_EXISTS, which results in a boolean: &lt;PRE&gt;if (!file_&amp;lt;%=cid%&amp;gt;.exists()) {&lt;BR /&gt;    globalMap.put("&amp;lt;%=cid %&amp;gt;_EXISTS",false);&lt;BR /&gt;}else{&lt;BR /&gt;	globalMap.put("&amp;lt;%=cid %&amp;gt;_EXISTS",true);&lt;BR /&gt;}&lt;/PRE&gt;&lt;BR /&gt;(source: &amp;lt;Talendfolder&amp;gt;/plugins/org.talend.designer.components.localprovider_&amp;lt;tal_version&amp;gt;/components/tFileExists/tFileExists_main.javajet)&lt;BR /&gt;while tSCPFileExists uses the following code to set tSCPFileExists_n_STATUS, which is a String:&lt;BR /&gt;&lt;PRE&gt;if(("").equals(stringStderr_&amp;lt;%=cid %&amp;gt;.toString()) || stringStderr_&amp;lt;%=cid %&amp;gt;.toString() == null){&lt;BR /&gt;	globalMap.put("&amp;lt;%=cid %&amp;gt;_STATUS", "File exists.");&lt;BR /&gt;}else{&lt;BR /&gt;	globalMap.put("&amp;lt;%=cid %&amp;gt;_STATUS", stringStderr_&amp;lt;%=cid %&amp;gt;.toString());&lt;BR /&gt;}&lt;/PRE&gt;&lt;BR /&gt;(source: &amp;lt;Talendfolder&amp;gt;/plugins/org.talend.designer.components.localprovider_&amp;lt;tal_version&amp;gt;/components/tSCPFileExists/tSCPFileExists_main.javajet)&lt;BR /&gt;To use the tSCPFileExists component you should probably use the following syntax: ((String)globalMap.get("tSCPFileExists_1_STATUS")).equals("File exists.")&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Regards,&lt;BR /&gt;Arno</description>
      <pubDate>Tue, 11 Oct 2011 07:37:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/using-of-tSCPFileExists/m-p/2370393#M133442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-11T07:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: using of tSCPFileExists</title>
      <link>https://community.qlik.com/t5/Talend-Studio/using-of-tSCPFileExists/m-p/2370394#M133443</link>
      <description>Hi Arno,&lt;BR /&gt;thanks for your help.&lt;BR /&gt;Now I use following syntax in an If-Connection: ((String)globalMap.get("tSCPFileExists_1_STATUS")) == ("File exists.")  &lt;BR /&gt;and so it works.&lt;BR /&gt;Many regards,&lt;BR /&gt;Detlef</description>
      <pubDate>Tue, 11 Oct 2011 09:09:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/using-of-tSCPFileExists/m-p/2370394#M133443</guid>
      <dc:creator>gsta02</dc:creator>
      <dc:date>2011-10-11T09:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: using of tSCPFileExists</title>
      <link>https://community.qlik.com/t5/Talend-Studio/using-of-tSCPFileExists/m-p/2370395#M133444</link>
      <description>Hi Detlef, 
&lt;BR /&gt;This might indeed work, however, I suggest you use the syntax with the equals method as in my sample: ((String)globalMap.get("tSCPFileExists_1_STATUS")).equals("File exists.") 
&lt;BR /&gt;The syntax for negation would be: !((String)globalMap.get("tSCPFileExists_1_STATUS")).equals("File exists.") 
&lt;BR /&gt;These result in a boolean, equal to your result, but using == for string comparison in Java is discouraged, as far as I know (I'm not a java programmer myself). 
&lt;BR /&gt;Any way, glad I could help you out! 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Arno</description>
      <pubDate>Tue, 11 Oct 2011 10:34:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/using-of-tSCPFileExists/m-p/2370395#M133444</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-10-11T10:34:37Z</dc:date>
    </item>
  </channel>
</rss>

