Copying file into two different directory based on tSystem output

One Star

Copying file into two different directory based on tSystem output

Hi all,
i need to move the input files to the destination directory based on the output. my job is

tFileList -- iterate --> tSystem -- if -- > tFileCopy_1
|
|
------ if -- > tFileCopy_2

i've checked the tSystem option Standard output & errors to "global variable".
my job returns the output text "date time .... ... successful ... ...." when it parsed successfully..
otherwise "some text ... .... unsuccessful ...... some text ".
if its parsed successfully i wanna copy into a dest dir (say A) , otherwise say B.
i referred 2697 . so for if condition(1) i've given !((String)globalMap.get("tSystem_1_OUTPUT")).matches(".*Unsuccessful.*") && for if(2)
((String)globalMap.get("tSystem_1_OUTPUT")).matches(".*Unsuccessful.*")

but its not working properly, can anyoe please help me out to come out of this ..
One Star

Re: Copying file into two different directory based on tSystem output

Hi,
Can you give us more details that we can help you? what's going wrong?
Regards,
Youssef
Community Manager

Re: Copying file into two different directory based on tSystem output

Hello
my job returns the output text "date time .... ... successful ... ...." when it parsed successfully..
otherwise "some text ... .... unsuccessful ...... some text ".

set condition if successful:
!((String)globalMap.get("tSystem_1_OUTPUT")).contains("unsuccessful")
otherwise unsuccessful:
((String)globalMap.get("tSystem_1_OUTPUT")).contains("unsuccessful")
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business