How to edit .txt file by batch file?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Mohammad_Dos
Posts: 84
Joined: 08 Sep 2010 10:25
Location: Iran,Kashan
Contact:

How to edit .txt file by batch file?

#1 Post by Mohammad_Dos » 02 Dec 2010 05:33

Hi
I use this command for creat a text file in dos:

Code: Select all

copy con c:\hi.txt

and then I enter the text and press:

Code: Select all

Ctrl+z

for save

or

Code: Select all

echo Hi>c:\hi.txt

echo I am mohammad>>c:\hi.txt[/code]


and for display it:

Code: Select all

type c:\hi.txt


My Questions:
how to edit created file and remove some of texts from it?
is exist more commands for creat a text file?

Post Reply