Knowledge Walls
John Peter
Pune, Maharashtra, India
Things to Know [cont'd]
How to append string in a file using MS DOS Commands
12598 Views
echo welcome > filename.txt
(>) Used to create new file if already exist replace existing text and creating on the given file.

echo welcome >> filename.txt
(>>) Used to append output to a file if file is not exist creating the file and append given output to the file.
Example batch file program
@echo off

echo my first line > test.txt
echo my second line >> test.txt
echo my third line >> test.txt
Output 
Next Topics
Next lessons of current book.
Best Lessons of "MS-DOS Commands"
Top lessons which are viewed more times.
Arithmetic Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
Relational Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
String manipulation of MS-DOS Commands
Things to Know of MS-DOS Commands
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details