I do not quite understand. But you can use
Path class[
^] to do all sorts of path and file operations.
If you just wants to get rid of "loadedText_", then just do a
string filename = "loadedText_123.txt";
filename = filename.Replace("loadedText", string.Empty);