My program generates an XML file with the following name:
C: /FileFile/NOMETER_DOM_Data_NrFeaturesNoXML.xml
At the moment, every time I generate a file and it has nrDeElementosNoXML
other than nrDeElementosNoXML
of the existing file, it creates me one more file. Can I use some method to delete the file that already exists before creating a new one? Something like this:
if(File.Exists(@"C:/caminhoDosFicheiro/NOMEQUENAOMUDA_data_*valorDesconhecido*.xml"))
{
File.Delete(@"C:/caminhoDosFicheiro/NOMEQUENAOMUDA_data_*valorDesconhecido*.xml");
}