Add a new line to a text file in MS-DOS

后端 未结 6 1106
攒了一身酷
攒了一身酷 2020-12-24 05:11

I am making a .bat file, and I would like it to write ASCII art into a text file.

I was able to find the command to append a new line to the file when e

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-24 05:55

    You can easily append to the end of a file, by using the redirection char twice (>>).


    This will copy source.txt to destination.txt, overwriting destination in the process:

    type source.txt > destination.txt
    

    This will copy source.txt to destination.txt, appending to destination in the process:

    type source.txt >> destination.txt
    

提交回复
热议问题