can anyone hepl me out with this ???
thanks
i want to replacea character in a text file using batch file
Moderator: DosItHelp
Re: i want to replacea character in a text file using batch
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.html
Sincerely
Andi
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.html
Sincerely
Andi
-
- Posts: 319
- Joined: 12 May 2006 01:13
Re: i want to replacea character in a text file using batch
download sed for windows then use this syntax
the "g" modifier does a global replacement.
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
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
Tell some more about the file and the character you want to replace.
Regards
aGerman