Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xp_cmdshell Echo Echo

Status
Not open for further replies.

Shilohcity

Technical User
Jul 12, 2000
136
GB
Is that an echo I hear? :-D

I am trying to output an echo command into a batch file so the batch file can output into another file like so:

xp_cmdshell 'echo echo file2Output >> file2.txt >> file1.bat'

As there are 2 echo commands things are getting a bit muddled and the output I get in file1.bat is:

file2Output

when what I am after is:

echo file2Output >> file2.txt

I am not sure how to get around this so any suggestions or advice would be most appreciated.

Cheers

Justin.

"Creativity is the ability to introduce order into the randomness of nature." Eric Hoffer

Visit me at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top