batchfile change line

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
dani8190
Posts: 7
Joined: 17 Mar 2010 03:15

batchfile change line

#1 Post by dani8190 » 20 Mar 2010 13:59

how to make a batchfile change a single line in any place in a textfile?

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: batchfile change line

#2 Post by aGerman » 20 Mar 2010 15:06

This is not possible. You could read the file line by line, change what you want, write it to a new file and finally replace the old file.
Explain what you wanna do.

!k
Expert
Posts: 378
Joined: 17 Oct 2009 08:30
Location: Russia

Re: batchfile change line

#3 Post by !k » 21 Mar 2010 04:05

dani8190
You can use an external utility sed (GNU and super-sed versions is guaranteed) with a key --in-place

Post Reply