static void Main(string[] args) { var fileDirPath = new DirectoryInfo(@"C:\7compressNigol"); FileInfo[] Files = fileDirPath.GetFiles("*.*"); //var prefferedPath = @"C:\7compressNigol\123.zip"; List<string> filesToZip = new List<string>(); foreach (FileInfo file in Files) { ProcessStartInfo p = new ProcessStartInfo(); p.FileName = @"C:\7compressNigol\7z.exe"; //p.Arguments = "a /d \"" + prefferedPath + "\" \"" + fileDirPath + "\""; p.Arguments = "a \"" + file + "\" \""; p.WindowStyle = ProcessWindowStyle.Hidden; Process x = Process.Start(p); x.WaitForExit(); return; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)