FolderCompress-Pass locked Files ?

Jul 27, 2009 at 12:59 PM

Hello

i want to use SevenZipSharp to Backup a big Folder. But some Files are locked or i have no access.

If a file like this in the Folder the resulting ZIP File is corrupt.

With tmp.ScanOnlyWritable = true there is no different.

 

My Code:

 

public cZip(string sxFolder, string sxZipName)
  {

  tmp.ArchiveFormat = OutArchiveFormat.SevenZip;
  tmp.CompressionLevel = CompressionLevel.None;
  tmp.CompressionMethod = CompressionMethod.Copy;
  tmp.IncludeEmptyDirectories = true;
  tmp.DirectoryStructure = true;
  tmp.ScanOnlyWritable = true;
  sFolder = sxFolder;
  sZipName = sxZipName;
  bFolder = true; 
   
  }

 and:

public void StartZip()
  {
  if (bFolder)
  try
  {
  tmp.CompressDirectory(@sFolder, sZipName,true);
  }
  catch (Exception e)
  {
  log1.toLog("CompressDirectory", e.Message.ToString());
  }
  else
  {
  MakeFileZip();
  }
  log1.Close();
  }

 

Pleas Help

Helge Schmitz

 

Coordinator
Jul 27, 2009 at 3:06 PM

Thanks for your request, I will see about it.