string filePath = Server.MapPath("~/ImportBaseInfo/");
string[] filePaths = Directory.GetFiles(filePath);
foreach (string filepath in filePaths)
{ File.Delete(filepath); }
灵感来自大佬:https://www.cnblogs.com/hongkun/p/7993619.html
原文:https://www.cnblogs.com/zhangbupangpang/p/14391954.html