[C#]使用CMD命令删除文件函数
#region 使用CMD命令删除文件函数 /// <summary> /// 使用CMD命令删除文件函数 /// </summary> /// <param name="strFilePath">文件地址</param> /// <returns>执行结果</returns> public bool GetRunCmdDeleteFile(string strFilePath) { try { // 实例化一个进程类 System.Diagnostics.Process MyProcess = new System.Diagnostics.Process(); // 使用命令程序 MyProcess.StartInfo.FileName = "CMD"; // 标准输入 MyProcess.StartInfo.RedirectStandardOutput = true; // 标准输出 MyProcess.StartInfo.RedirectStandardInput = true; // 将cmd的标准输入和输...

