Welcome to the Xceed Community | Help
Community Search  
More Search Options

FilesToExclude unexpected behavior

Sort Posts: Previous Next
  •  05-22-2005, 9:02 PM Post no. 5535

    FilesToExclude unexpected behavior

    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.

    Example:

    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.

  •  05-23-2005, 11:46 AM Post no. 5536 in reply to 5535

    Re: FilesToExclude unexpected behavior

    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.
  •  04-27-2010, 9:06 AM Post no. 26625 in reply to 5536

    Re: FilesToExclude unexpected behavior

    Hi,

    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.

    Marlise

     

     

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.