I am trying save some text to a file. Originally to save it to text format file I added a .txt to the end of the file name which works fine.
However, there is a problem because when someone chooses to save over an existing file the file then saves as filename.txt.txt.
Does anyone know of a good solution? One way is to check the last three characters of the file name for .txt. Is there an easy way to do this?