Computer Hope

Software => Computer software => Topic started by: Lunar on May 18, 2010, 04:54:29 PM

Title: Batch File that Creates Files
Post by: Lunar on May 18, 2010, 04:54:29 PM
Hello everyone!  I was on this website looking up a couple things and I decided I could use some help real quick.  My mom asked me if she would make me a program to keep records of hours and stuff.  But, I am making it in a batch file.  I have the coding and everything like cd and md, but I don't know how to make a batch file create a text document.  Anyone help?

Or, if there is another programming language that will create text documents please specify it in your comment.
Title: Re: Batch File that Creates Files
Post by: Helpmeh on May 18, 2010, 05:47:55 PM
Echo First line > textfile.txt
echo second line >> textfile.txt
echo third line >> textfile.txt

Please note the extra > in the second and third lines. If there was only one, it would replace the contents of the file with whatever is being echoed.