Hello,

I recently learned a new batch command and I was wondering if I could make a batch file from at root batch file...
Ex:

echo pause>\test.bat

This code makes a batch file that has the command pause.

Now would I make a multi-line batch file using this code?
Ex: I want the root file to make a batch file that completes a C:\ tree and than changes color (tree, color 0a)?

-Thanks

Recommended Answers

All 2 Replies

Hello,

It is all in the redirects you use. > writes over the file if there is one and >> appends to the file.

echo "second line of code" >> \test.bat

Thank You Very much!

Hello,

It is all in the redirects you use. > writes over the file if there is one and >> appends to the file.

echo "second line of code" >> \test.bat

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.