make batch file to add text to end of th file

August 30, 2010 at 06:07:43
Specs: Windows XP
Plz tell me how to add some text to the end of the text file.


I want to and a tns in tnsnames.ora file

# PMO production

PMO.comuk =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(Host =axxxa)(Port = 1234))
)
(CONNECT_DATA =
(SID = PMO)
)
)

add above text to end of tnsnames.ora file.

Please help me .shall be thankful..


See More: make batch file to add text to end of th file

Report •


#1
August 30, 2010 at 16:31:35
(
ECHO Line 1
ECHO Line 2
ECHO Line 3
) >> FileName.txt

Using that you should be able to figure it out.

*">" will erase the contents of the file and put the new lines in the file. ">>" will add the new lines to the bottom of the file.

Good Luck!

Can I put a question here?


Report •

#2
August 30, 2010 at 21:52:24
this solves half of my problem.

I want some text in the end of other text file .Means I want to add new tns in the existing tnsnames.ora file.

So I want text of aaa.txt to end of bbb.txt file.


Report •

#3
August 30, 2010 at 22:23:01
Hey I have tried
(
ECHO Line 1
ECHO Line 2
ECHO Line 3
) >> FileName.txt

But when I use
ECHO ADDRESS = (PROTOCOL = TCP
ECHO )

when I use " ) " the program terminates.

Please tell me how to enter a text as a whole or how to add ) this bracket.


Report •

Related Solutions

#4
September 16, 2010 at 20:11:02
Try escaping each parenthesis you want to write to the file with a caret ^...

(
ECHO ADDRESS = ^(PROTOCOL = TCP
ECHO ^)
) >> FileName.txt


Report •

#5
September 16, 2010 at 22:25:22
Thanks A lot

Report •

Ask Question