+ Post New Thread
Results 1 to 8 of 8
Coding Thread, Find & replace in DOS? in Coding and Web Development; Is it possible to find and replace in DOS? I need to replace a single character in a file on ...
  1. #1
    Guest

    Join Date
    Jun 2009
    Posts
    3,754
    Thank Post
    1,458
    Thanked 490 Times in 375 Posts
    Rep Power
    0

    Find & replace in DOS?

    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 09:51 AM.

  2. #2

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740
    Quote Originally Posted by Rawns View Post
    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 ?
    Attached Files Attached Files
    Last edited by mattx; 8th September 2010 at 09:49 AM.

  3. Thanks to mattx from:

    Rawns (8th September 2010)

  4. #3

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    5,641
    Thank Post
    685
    Thanked 1,400 Times in 1,160 Posts
    Rep Power
    353
    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.

  5. Thanks to vikpaw from:

    Rawns (8th September 2010)

  6. #4

    vikpaw's Avatar
    Join Date
    Sep 2006
    Location
    Saudi Arabia
    Posts
    5,641
    Thank Post
    685
    Thanked 1,400 Times in 1,160 Posts
    Rep Power
    353
    there you go, that's probably better.

  7. Thanks to vikpaw from:

    Rawns (8th September 2010)

  8. #5
    Guest

    Join Date
    Jun 2009
    Posts
    3,754
    Thank Post
    1,458
    Thanked 490 Times in 375 Posts
    Rep Power
    0
    Thanks Mattix , I used the CHANGE.COM file and incorporated it nicely into a little batch file that's worked a treat.

  9. #6

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,157
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    124
    Good to see you're sorted but for the future you might want to use FART: Find And Replace Text just because it has a wonderful name :-)

  10. #7

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740
    Quote Originally Posted by Rawns View Post
    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

  11. #8

    Join Date
    Jan 2006
    Location
    Surburbia
    Posts
    2,178
    Thank Post
    74
    Thanked 307 Times in 243 Posts
    Rep Power
    115
    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".

SHARE:
+ Post New Thread

Similar Threads

  1. MS Excel find and replace CR+LF
    By firefighting in forum Office Software
    Replies: 5
    Last Post: 20th November 2013, 08:18 AM
  2. Replies: 0
    Last Post: 13th April 2010, 04:10 PM
  3. 16 bit MS - Dos subsystem & AWSCAN.EXE
    By mattx in forum Windows
    Replies: 0
    Last Post: 25th September 2009, 10:23 AM
  4. Find File & Replace
    By 1202 in forum Windows 7
    Replies: 0
    Last Post: 3rd May 2009, 08:15 AM
  5. CLI find & replace.
    By PiqueABoo in forum Windows
    Replies: 12
    Last Post: 23rd February 2009, 09:43 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •