net C# 处理文件夹里的文件
WriteCSVFile(users); string srcFileName = "order_" + DateTime.Now.ToString("yyyy-MM-dd") + ".csv"; string tempFileName = "ordertemp_" + DateTime.Now.ToString("yyyy-MM-dd-ffff") + ".csv"; try { string[] files = Directory.GetFiles(Directory.GetCurrentDirectory(), "ordertemp_*.*"); foreach (string file in files) { File.Delete(file); } } catch (Exception ex) { // MessageBox.Show(ex.Message); } File.Copy(srcFileName, tempFileName, true); System.Diagnostics.Process.Start(tempFileName);