-1
Aşağıdaki C# kodunda .zip dosyasının konumunu files
parametresine iletmem gerekiyor.7-Zip hatası alıyorum - Boşluklu dosya adlarını Process.Start() yöntemiyle iletilemiyor.
Dosya adı boşluk İÇERMEZ, her şey yolunda çalışıyor. Ancak, dosya adı boşluk içeriyorsa, aşağıdaki hatayı atıyor.
kodum olan arşiv Aşağıda
bulunamıyor: Biri bana önermek misiniz nasıl bu sorunu çözebilir?
static void UnzipToFolder(string zipPath, string extractPath, string[] files)
{
string zipLocation = ConfigurationManager.AppSettings["zipLocation"];
foreach (string file in files)
{
string sourceFileName = string.Empty;
string destinationPath = string.Empty;
var name = Path.GetFileNameWithoutExtension(file);
sourceFileName = Path.Combine(zipPath, file);
destinationPath = Path.Combine(extractPath, name);
var processStartInfo = new ProcessStartInfo();
processStartInfo.FileName = zipLocation;
processStartInfo.Arguments = @"x " + sourceFileName + " -o" + destinationPath;
processStartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
var process = Process.Start(processStartInfo);
process.WaitForExit();
}
}
Teşekkür bile bana nedenini söylemeden. –