I'm trying to read all text and replace certain text in a specific location. That location needs to have the username.
File path:
C:\Users\zmatar\AppData\Roaming\NexJen Systems\My
Here is what I have. I get an error saying it cannot find the location. What I was going to do is maybe pass it to a label and then add the label into the location? idk
string text = File.ReadAllText(@"C:\Users\System.Environment.UserName\AppData\Roaming\NexJen Systems\My\IsisSettings.isis");
text = text.Replace("172.16.1.24", "172.16.1.23");
File.WriteAllText(@"C:\Users\System.Environment.UserName\AppData\Roaming\NexJen Systems\My\IsisSettings.isis", text);