ReplaceFileNameCharctersWhen programatically creating files, it is easy to have unwanted characters creep into your file names. I have this function to remove illegal filename characters. I also remove characters that I just don’t want but are legitimate for a Windows file name.