I want to programmatically edit file content using windows command line (cmd.exe). In *nix there is sed for this tasks. Is there any usefull equivalent in windows?
Edit: I am looking for native command line solution.
I use Cygwin. I run into a lot of people that do not realize that if you put the Cygwin binaries on your PATH, you can use them from within the Windows Command shell. You do not have to run Cygwin's Bash.
You might also look into Windows Services for Unix available from Microsoft (but only on the Professional and above versions of Windows).
You could install Cygwin (http://www.cygwin.com/) and use sed from there.
I use Cygwin. I run into a lot of people that do not realize that if you put the Cygwin binaries on your PATH, you can use them from within the Windows Command shell. You do not have to run Cygwin's Bash.
You might also look into Windows Services for Unix available from Microsoft (but only on the Professional and above versions of Windows).
Try fart.exe. It's a Find-and-replace-text utility that can be used in command batch programs.
http://sourceforge.net/projects/fart-it/
I needed a sed tool that worked for the Windows cmd.exe prompt. Eric Pement's port of sed to a single DOS .exe worked great for me.
It's pretty well documented.
UnxUtils provides sed for Win32, as does GNUWin32.
You could look at GNU Tools, they provide (amongst other things) sed on windows.