Jump to content

Recommended Posts

Posted (edited)
Is it possible to find and replace in DOS? I need to replace a single character in a file on various workstations... Edited by Rawns
Posted (edited)
Is it possible to FIND and replace in DOS? I need to replace a single character in a file on various workstations...

 

Will the 'findstr' & 'change' command help you ?

CHANGE.ZIP

Edited by mattx
  • Thanks 1
Posted

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.

  • Thanks 1
Posted
Thanks Mattix , I used the CHANGE.COM file and incorporated it nicely into a little batch file that's worked a treat. :)

 

Not a problem - I used to love scripting in DOS many years ago - once incorporated a complete auto install procedure for a windows95 build for a token ring network in my old job.....

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

Posted
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".

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...