0
Thanks

A few words of thanks would be greatly appreciated.

Write in a batch file in text mode

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:
0
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
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).

0 Comments