One Star

how to execute dos commands and write the data in a text file?

Hi
I want to run some dos commands through Talend. I dont know which component to use.
And then I want to write some data in a text file (append a text file).
can you tell me how to do these two things?
Thanks!
7 REPLIES
Community Manager

Re: how to execute dos commands and write the data in a text file?

Hello
You can use the tSystem component.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: how to execute dos commands and write the data in a text file?

Hi shong
I want to go into a directory say d:/nitin/para
and then run a command that uses another .exe file e.g : kev.exe -t -y -i "T56Y" in.csv out.csv
Can you tell how to write it in tSystem. It shows error here..
Community Manager

Re: how to execute dos commands and write the data in a text file?

Hello
Please see 7171 and see my screenshot.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: how to execute dos commands and write the data in a text file?

Thanks!!
One Star

Re: how to execute dos commands and write the data in a text file?

And how do I append a text file in Talend??
One Star

Re: how to execute dos commands and write the data in a text file?

It's not talend which is writing to your file, it's the program you told Talend to launch, "kev.exe" in your example.
Try to find the best command line possible.
One Star

Re: how to execute dos commands and write the data in a text file?

Actually I have to read a csv file, extract some data from it and put it at the bottom of a text file. So, after extracting the data, how can i write in notepad in talend?