1.

Solve : Need a help for writing a batch script !!!?

Answer»

hi,
firstly am NEW into this batch scripting and am basically a UNIX guy !! (please dont hate me for this)

now have got a task of writing my first batch FILE ! well the problem am facing is as mentioned below !

i want to write a line as shown below into one file through a batch file

ECHO <stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ ARGUMENTS" value="-messagelog stdout -rulesfile &quot;\${resource_name}\&quot;"/> > test.xml

but am facing error when i run the above statement in my batch file as shown below !

The syntax of the command is incorrect.

i tried giving double quotes and single quotes in the echo statement as above , but then didnt work out ! i tried to figure out (still figuring out) on various online tutorials , but then no use, i see only a simple line being echoed into a file , no were i COULD find a explanation to echo a complaex line as above into a file.

your help in this REGARD would be highly appreciated ! < and > have special meaning in batch scripting. Use the caret to show where those CHARACTERS are not to be treated as special chars.

Quote

ECHO ^<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ ARGUMENTS" value="-messagelog stdout -rulesfile &quot;\${resource_name}\&quot;"/^> > test.xml

Then check the test.xml file to ensure the format is correct.

Good luck.

Edit: & Welcome to the CH forums.BINGO !!!! Thanks a lot Dusty !!


Discussion

No Comment Found