I have a listbox1, in this list is say 10 .txt files. I want to open and modify some text strings inside the files (all items in listbox1).
I can pull the directory files in fine, and I can write to the files one by one fine... how do I do multiple?
folderBrowserDialog1.ShowDialog(); textBox3.Text = folderBrowserDialog1.SelectedPath;
Edit text file and write again.
string text = File.ReadAllText(@"c:\test.txt"); text = text.Replace(textBox1.Text, textBox2.Text); File.WriteAllText(@"c:\test.txt", text);
So I basically need this doing for each item inside listbox1.