Home Forums ActiveX components Xceed Zip for ActiveX & x64 XceedZip 4.5 Problem..

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #41875 |

    Hello.

    Here is directory information..

    c:\test\test.txt
    c:\test\no.txt
    c:\test\ok.txt
    c:\test\good\right.txt
    c:\test\good\xceed\left.txt
    c:\test\good\empty\ —> empty folder..
    c:\test\ohmy\test.txt

    first, here is sample code that I tested… and I use Delphi.

    ZipEngine.FilesToProcess := ”;
    ZipEngine.BasePath := ‘c:\test’;

    ZipEngine.FilesToProcess := ‘test.txt’#13#10’good\*.*’;

    ZipEngine.ExcludedFileAttributes := xfaVolume + xfaFolder;
    ZipEngine.PreservePaths := True;
    ZipEngine.ProcessSubfolders := True;
    ZipEngine.ZipFilename := ‘c:\test\test.zip’;
    ZipEngine.Zip;

    This code compress ‘c:\test\test.txt’ and ‘c:\test\ohmy\test.txt’ both of them.. if there are same file name in subfolders, it compress together.. but I don’t want to…

    Here is my desired result…
    test.txt
    good\right.txt
    good\xceed\left.txt
    good\empty

    but Your ExceedZip 4.5 gives me this result..
    test.txt
    good\right.txt
    good\xceed\left.txt
    ohmy\test.txt

    Is there solution for it? Please let me know…

    P.S : I tried to upgrade XceedZip 5.0, but it dosn’t work with ‘BasePath’ property, I tried it with my 4.5 registered key..

    P.S : is 4.5 support BZip2? cuz, I tried to open *.bz2 file with it, but it gives me an error that need next disk…

    Thanks a lot.

    Imported from legacy forums. Posted by midmee (had 3174 views)

    User (Old forums)
    Member
    Post count: 23064

    Hello midmee.

    First, you explicitly set ExcludedFileAttributes to “xfaVolume + xfaFolder”, which means “don’t add folder and volume entries to the zip file”. That’s why your empty folder does not get zipped. Set it to “xfaVolume” only. Folders and paths are two different things. PreservePaths makes sure every entry (file or folder) also remembers it’s full path (without BasePath). ExcludedFileAttributes rejects entries with those attributes.

    Second, ProcessSubfolders applies to each and every entry in FilesToProcess, even those without wildcards. So the library matches all “test.txt” in any subfolders when ProcessSubfolders is true.

    You have two choices:

    A) Use an hidden feature exposed in “Xceed Backup Library”, but available in Xceed Zip ActiveX:

    Each entry in FilesToProcess can end with either “<R>” or “<S>”, to indicate that this particular line should recurse. So, if you leave ProcessSubfolders to false, and append this suffix only to those lines you wish to be recursive, you will get the behavior you’re looking for. But I can’t garantee you this feature was exposed in every version of Xceed Zip ActiveX. You’d be better downloading the latest DLL. It supports v4.x licenses.

    More info <A HREF=”http://doc.xceedsoft.com/products/backup/sources/filestoprocess_property.htm”>here</A&gt;.

    Your FilesToProcess would look like this:

    <code> ZipEngine.FilesToProcess := ‘test.txt’#13#10’good\*.*<R>’;</code>

    B) Use wildcards in the path portion of your FilesToProcess.

    The Xceed Zip Compression Library lets you put wildcards in the path portion of a FilesToProcess entry. If you know the subfolder depth is limited, you can leave ProcessSubfolders to false, and add something like this in FilesToProcess:

    <code> ZipEngine.FilesToProcess :=
    ‘test.txt’#13#10’good\*.*’#13#10’good\*\*.*’#13#10’good\*\*\*.*’;</code>

    This example will include every file in up to three subfolders deep.

    By the way, the file pattern matching used by Xceed Zip is a strict matching. The use of <B>”*.*”</B> will only match files which <B>have an extention</B> (have a dot in their name). Use a simple “*” to match any file, with or without an extention.

    Imported from legacy forums. Posted by Martin (had 3646 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.