I would like an MS-DOS batch file that asks the user to type in some text and then put that text into several other files instead of a specific peice of text in those other files.
For example, if I have 3 files named file1.txt, file2.txt and file3.txt respectively, each containing a chunk of text, somewhere in which is the word DEFAULT_WORD, I would want this batch to take in a word or words from the user - for example NEW WORDS - and then replace every occurence of DEFAULT_WORD with NEW WORDS in all three of the text files.
Can answerers please leave the code in their answer and I will then put this in a batch and test it. The best working batch will win the best answer. Also, explainations of anything unusual or complex in the code would be greatly appreciated (but entirely optional).
2006-09-16
04:10:32
·
3 answers
·
asked by
Rich
5
in
Computers & Internet
➔ Programming & Design
Well psstthok, if its so simple then I'm sure it wouldn't have been too much bother for you to actually answer my question.
2006-09-16
04:36:44 ·
update #1
To linen: you seem to know what you're talking about, but I'm not so keen on having to install extra software for this to work; I'd rather a batch that would work on a machine that has (and shall have) no extra software installed.
2006-09-16
04:40:17 ·
update #2