Page 1 of 1
i want to replacea character in a text file using batch file
Posted: 25 Jul 2010 23:15
by ashdepp
can anyone hepl me out with this ???
thanks
Re: i want to replacea character in a text file using batch
Posted: 26 Jul 2010 00:15
by Andi
Hi
you should post what exactly you want to do; at the moment it is too abstract.
You would have to know what exactly you want to replace.
You may want to check out sfk.exe - a free tool which you could download here:
http://stahlworks.com/dev/swiss-file-knife.htmlSincerely
Andi
Re: i want to replacea character in a text file using batch
Posted: 26 Jul 2010 01:05
by ghostmachine4
download
sed for windows then use this syntax
Code: Select all
c:\> sed "s/old word/replacement/g" file
the "g" modifier does a global replacement.
Re: i want to replacea character in a text file using batch
Posted: 26 Jul 2010 05:46
by aGerman
Using native batch you have to do that with a FOR loop. If the file contain nonpritable characters it will not work. If the file contain spezial characters like ^<>|& it's possible but difficult.
Tell some more about the file and the character you want to replace.
Regards
aGerman