echo output help

October 2, 2009 at 23:58:50
Specs: Windows XP
i need some help with my echo >> output
i need to output this line and save it as another batch file

ECHO for /f "tokens=2 delims=," %%a in (1.csv) do >> 2.csv echo %%a

but i cannot do this

ECHO for /f "tokens=2 delims=," %%a in (1.csv) do >> 2.csv echo %%a >> batchfile.bat

as it will recognize the first set of >> as output


See More: echo output help

Report •


#1
October 3, 2009 at 00:08:01
^ escapes most characters, You will also need to double all %'s.
If inside a code block you may also need to escape the
brackets.

It is also good practice to redirect before the command to
avoid trailing spaces or conflict with destination redirection
(ie 2>nul to discard stderr).

>> batchfile.bat ECHO for /f "tokens=2 delims=," %%%%a in (1.csv) do ^>^> 2.csv echo %%%%a


Batch Variable how to


Report •

#2
October 3, 2009 at 00:13:02
thanx again judago thats twice in a day! works like a charm!!!

Report •

Related Solutions


Ask Question