How to write to a batch file a command which itself writes to another file. Basically what I'm trying to achieve is this
File1.bat
echo abc >> op.txt
File2.bat
echo abc >> op.txt >> main.txt
I'd like to following statement to be the content of main.txt when I run File2.bat but that didn't happen
main.txt
echo abc >>op.txt