Is there an issue with tSCPFileExists ?

One Star

Is there an issue with tSCPFileExists ?

I'm using the component tSCPFileExists of talend to check either my file which is in a remote server exists or not. But I'm getting this error
"'ls' is not recognized as an internal or external command " 

It seems that talend has a problem with this component !
Moderator

Re: Is there an issue with tSCPFileExists ?

Hi,
Could you please post your  tSCPFileExists component setting screenshot on forum which will be helpful for us to address your issue?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Is there an issue with tSCPFileExists ?

 This is my tSCPFileExists 
                             
And this is my hole job
                            

                                         
Moderator

Re: Is there an issue with tSCPFileExists ?

Hi,
From  your screenshots, we see that you are using tjava component in your job. Do you want to print out message on console directly? What does the code look like? Could you please check if there is any error in java line?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Is there an issue with tSCPFileExists ?

I'm using tJava to print in my console directly if the file exists or not
Here is the code inside
   System.out.println("File name : "+(String)globalMap.get("tSCPFileExists_1_FILENAME"));
   System.out.println("Statut : "+(String)globalMap.get("tSCPFileExists_1_STATUS"));
One Star

Re: Is there an issue with tSCPFileExists ?

I took a look on the source code generated by Talend, here it is :

StringBuilder command_tSCPFileExists_1 = new StringBuilder();
command_tSCPFileExists_1.append("ls \"").append("E:/coreso")
.append("/").append("a.txt").append("\"");
globalMap.put("tSCPFileExists_1_FILENAME", "a.txt");

Hence 
Talend execute ls command on the remote machine, I guess it works on Linux based machines and not in windows ones. Is it true ?!
In fact, my remote server is a windows server :/
Moderator

Re: Is there an issue with tSCPFileExists ?

Hi,
Could you please indicate on which build version you got this issue?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Is there an issue with tSCPFileExists ?

Talend ESB 6.1.1
my mail : aabdellaoui@freedomofdev.com
phone number : 21620394340