C#.NET - Search, Replace and Update Text Files
Posted on 2012-03-26
I need to write a C#.NET console application that can do the following:
- Read in all text files in a given directory.
- Search each text file in the specified path for a particular text pattern.
- If it does not find the text pattern, it does nothing, and moves on to the next file.
- If it does find the text pattern, it must delete a certain amount of text, stopping at the next place it finds the characters HL*, then update a counter at the bottom of the text file so it shows 7 less than it originally did.
I'm a C#.NET web developer, and know nothing about writing console applications and performing the actions I specified above. Any help is very appreciated!!