Is it possible to find and replace in DOS? I need to replace a single character in a file on various workstations...
Last edited by Rawns; 8th September 2010 at 10:51 AM.
It can be done but i haven't done it for a while.
There is a FIND command MS-DOS find command help, and here's a link to some help with string manipulation commands DOS - String Manipulation
i'd probably use vbscript, or even some text editors will do that sort of thing now, the advanced notepad replacement types like textedit,notepad++ i'm sure they all do advanced find and replace across multiple docs. I would search for all the files you need then open them in the text editor from the search window and do it that way.
there you go, that's probably better.
Thanks Mattix , I used the CHANGE.COM file and incorporated it nicely into a little batch file that's worked a treat.
Every single aspect of the image was all DOS batch stuff. I'll shutup now as:
A: I'm quite pi55ed - [ Almost exploded today as I have had to really really bite my tongue ]
B: My Wine glass is empty
C: My tea is almost ready
For some reason most of these seem to be stuck in the genuine DOS world so I ended up writing my own util to get a job done. Lots of them would do ASCII (one byte per character) replaces, but I didn't find one that would also play nicely with the Unicode varieties e.g. some of those increasingly ubiquitous XML config files you might want to patch. IIRC I found something like eight different format varieties of what are superficially "text files".
There are currently 1 users browsing this thread. (0 members and 1 guests)