1.

Solve : Write to file with echo and use \n?

Answer»

Hi i'm wondering if there is way to append text to some file going to the next line.
For exampe if my text file is text.txt and contains the line this is an example using echo this is another example>>text.txt the results is in the file text.txt is:

this is a examplethis is another example while i would like to have

this is an example
this is another example

Thank youCode: [Select]echo.>>test.txt That will append a BLANK line onto test.txt

FB
Using only one ">" WITHIN the @echo command will either create a new "test.txt file" if one does not already exist or over write the contents of the "test.txt" file should one already exist.

@echo This will create a file with new contents > test.txt

Using two ">>" within thin the @echo command will append this line to the EXISTING "test.txt" file.

@echo This will append this line to the END of the file >> test.txt



Discussion

No Comment Found