#region 删除一个目录下的文件
        
public static void DelFile(string path)
        {
            DirectoryInfo dInfo 
= new DirectoryInfo(path);
            
foreach (FileInfo file in dInfo.GetFiles())
            {
               file.Delete();                
            }
        }

        
#endregion
参数path为目录的全路径

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
猜你喜欢
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2021-07-11
  • 2021-12-24
  • 2022-12-23
相关资源
相似解决方案