c# 在cmd中用 7z解压缩文件

时间:2021-12-01 16:06:32
var exePath = @"C:\Program Files\7-Zip\7z.exe";
var path = @"I:\work\MusicCatcher2\WindowsFormsApplication1\bin\Debug\";
var fileName = @"1.zip";
var cmd = "x \"" + path + fileName + "\" -y -aos -o\"" + path+"temp\\\"";//目的文件夹
Process process = new Process
{
StartInfo = {FileName = exePath, Arguments = cmd, WindowStyle = ProcessWindowStyle.Hidden}
};
process.Start();
process.WaitForExit();
process.Close();

c# 在cmd中用 7z解压缩文件