Write in a batch file in text mode

August 2017

In the operating system MS-Dos, batch file represents a text file with commands that the command interpreter executes. In MS-Dos, batch files are used to automate and simplify routine or mundane tasks . Batch files have generally file name extensions such as .bat. To write a batch file in the text mode, the use of redirect is compulsory. The batch file in the text mode can be created by using the Echo command. WordPad is useful for saving the file, with the extension of the .bat carried out here.
  • To write in a batch file in text mode, you just have to use a redirect:

echo text > output_file.txt
  • To write in an existing file:
  • echo " Write at the end of the file ">> output_file.txt
    • Note: The accent will be copied to the DOS format.
  • You can use WordPad to address this problem:


Published by deri58. Latest update on November 8, 2011 at 07:08 AM by Rik Sharma.
This document, titled "Write in a batch file in text mode," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).