I don't follow you ? if you create a string [] by calling File.ReadAllLines, you can iterate over the lines and call your method to get the filename, and then call File.WriteAllLines. Putting it in a richtextbox is superfluous, unless you want the user to hand edit the file. Even then, a text control makes more sense, b/c you don't have rich text to start with, do you ?
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )