1
How can I delete files from a folder by extension? "Got" files with this code:
string[] arquivos = Directory.GetFiles(st.path, "*.xml", SearchOption.AllDirectories);
But I can’t delete
1
How can I delete files from a folder by extension? "Got" files with this code:
string[] arquivos = Directory.GetFiles(st.path, "*.xml", SearchOption.AllDirectories);
But I can’t delete
6
How do you have a collection of string
s with the file paths, you can use the method Delete
class File
.
foreach(var arq in arquivos)
{
File.Delete(arq);
}
Browser other questions tagged c# filing-cabinet
You are not signed in. Login or sign up in order to post.