Home Forums ActiveX components Xceed Zip for ActiveX & x64 FilesToExclude unexpected behavior

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #42036 |

    When I specify either a wildcard or the complete filename of files I would like to exclude from being processed, files matching their description in subfolders below the path specified in FilesToExclude are also excluded.


    oZip.FilesToExclude = “C:\WINDOWS\*.log”

    I interpret this as “All .log files in C:\WINDOWS will be excluded”.

    But when executed, not only are .log files in the WINDOWS folder excluded, but .log files in WINDOWS\system32 and all other subfolders of WINDOWS are excluded. Same results when using the following:

    oZip.FilesToExclude = “C:\Program Files\Release Notes.txt”

    Any occurence of “Release Notes.txt” found in the Program Files folder or it’s subfolders will be excluded.

    If this is the expected behavior, then what is the correct approach to excluding only files that match within a specific folder while the ProcessSubfolders property is set to True?

    I’m using 6.0.5228 of XceedZip.dll.

    Imported from legacy forums. Posted by noonand (had 3162 views)

    User (Old forums)
    Post count: 23064

    The ProcessSubfolders property applies to both FilesToProcess and FilesToExclude. You can get around that behavior by using an undocumented feature that was created for Xceed Backup. When you set ProcessSubfolders to false, you can specify indivisual lines of FilesToProcess to also process subfolders by appending “<R>” or “<S>”.

    Thus, zipping every log file under “c:\Windows”, but not in “c:\windows” would be expressed as:

    xZip.FilesToProcess = “c:\Windows\*.log<R>”
    xZip.FilesToExclude = “c:\Windows\*.log”
    xZip.ProcessSubfolders = false

    Another way to acheive the same results would be to benefit from the capacity for FilesToProcess to accept wildcards in paths. You would do this:

    xZip.FilesToProcess = “c:\Windows\*\*.log”
    xZip.ProcessSubFolders = true

    This tells the library to include any “*.log” located in a subfolder of “c:\windows”. Since ProcessSubfolders is true, it will also zip files 3 or more folders deep.

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

    User (Old forums)
    Post count: 23064


    Just to add to the above issue with using wildcards in the FilesToProcess property.

     I have set the FilesToProcess property to the following – c:\temp\mbtest\projects\*000000*\*

    I would expect the component to behave as follows

    • zip all folders containing 000000 in their name (and their contents, including subfolders)

    The component is going further and zipping any file containing 000000 in their name outwith folders containing 000000.

    Does anyone have a workaround for this or do I have to manage this outwith using wildcards?

     Any help appreciated.




    Imported from legacy forums. Posted by Marlise (had 1692 views)

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