var dir = new DirectoryInfo(directoryPath);
foreach (var file in dir.EnumerateFiles("f*.txt")) {
file.Delete();
}
SOURCE : https://stackoverflow.com/questions/8807209/deleting-multiple-files-with-wildcard?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
'C#(CSharp) > Etc' 카테고리의 다른 글
Write exception log in File. (0) | 2018.05.29 |
---|---|
c# memory cache (0) | 2018.05.26 |
How to crop an image using C#? (0) | 2018.05.09 |
Get utc time to time zone standard time (0) | 2018.04.09 |
Windows/C# Timezone List (0) | 2018.04.09 |