1.

Solve : echo > into a file?

Answer»

I WANT put the following line through a batch file into the SECOND batch file

type nul > temp.txt

For EXAMPLE,

echo type nul > temp.txt >>test.bat

This failed because it will think ">" is a redirection. If I quoted
those contents like

echo "type nul > temp.txt" >>test.bat

The quotes also will be inside the second batch file, which is not what I wanted.

What's your opinion?

I am using windows XP command prompt.

graceI'm not too quick on the uptake but finally the light went on

Code: [SELECT]
echo type nul ^> temp.txt >>test.bat


Hope this helps.
You are great! It works!



Discussion

No Comment Found