For ANY operation on the
content of the file you MUST first open the file (ReadAllLines does open the file before reading it and closes after)!
However this may help you...
File.WriteAllLines(outputpath,File.ReadAllLines(inputpath).Select(s => s.Replace(".", " ")).ToArray());