2
My program generates an XML file named after the following structure:
C:/wayDosFile/Nameanob_data_nrdeelementosnoxml.xml
At the moment, I’m every time I file and he has the nrDeElementosNoXML
other than nrDeElementosNoXML
from the existing file, create me another file. Can I use any method to delete the file that is already there 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");
}
Before inserting a new one, you want to delete all existing ones that start with "Namean_date_name_"?
– Ismael
exactly, I wanted to see if anyone knows a simple technique, because I have some ideas on how to do it, but I’m pretty sure they’re not the best
– ihavenokia