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
Programming & Design