I have Multiple folder path:
SourceFilePath="C:\Users\Anuj\Desktop\PSI"
SourceFilePath1="C:\Users\Anuj\Desktop\Google"
SourceFilePath2="C:\Users\Anuj\Desktop\Isp"
I want to Compress These path Using 7zip Command line code along with a Zip Password.
Edit:
//Declare and instantiate a new process component.
System.Diagnostics.Process proc;
proc = new System.Diagnostics.Process();
//Do not receive an event when the process exits.
proc.EnableRaisingEvents = false;
//The "/C" Tells Windows to Run The Command then Terminate
string strCmdLine;
strCmdLine = "/C cd c:\\Program Files\\7-Zip\\ ";
strCmdLine += " & 7z a "// here i need help
System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
proc.Close();
What I actually Did:
var MultiplePathFolders=SourceFilePath+SourceFilePath1+SourceFilePath2
System.Diagnostics.Process proc;
proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
string strCmdLine;
strCmdLine = "/C cd c:\\Program Files\\7-Zip\\ ";
strCmdLine += " & 7z a " + SyncPath + "\\" + ZipName + "-FileName.7z " + MultiplePathFolders + " -p" + DecryptedPassword + "";
System.Diagnostics.Process.Start("CMD.exe", strCmdLine);
proc.Close();