The FilesToExclude property lets you exclude specific files or folders from the list of files to process provided to the FilesToProcess property.
Wildcards can be used to exclude multiple files.
To exclude a folder and its entire contents, specify the path and folder name, followed by a backslash and a star ("\*").
Files or folders that match the items specified in the FilesToExclude property will be tagged as "excluded" when the ZipPreprocessingFile or UnzipPreprocessingFile event is triggered, and will not be processed unless you change the value of the excluded parameter to False.
The FilesToExclude property is used the same way as the FilesToProcess property:
When using the Zip or the PreviewFiles method, files can be specified with absolute paths , relative paths or without paths.
When using the Unzip, RemoveFiles, ListZipContents or the TestZipFile method, the file names you provide to the FilesToExclude property must match with the path and filename information stored in the zip file.
When specifying multiple files to exclude, each file must be separated with the carriage return (ASCII 13), line feed (ASCII 10) character or the "|" character.
There's an AddFilesToExclude method equivalent of the AddFilesToProcess method.
You can use the "*" and "?" wildcards to exclude multiple files.
String
Empty
Declaration (DLL API) | |
---|---|
|
When using relative paths , they must be relative to the application's current directory , or the folder specified in the BasePath property if it has been set.
To exclude the folder's entry only, but not the folder's contents, specify the path and folder name followed by a backslash ("\"). This is allowed because a zip file can contain separate entries for folders and you may want to include or exclude these folder entries.
The length of the file names must not exceed 260 characters (MAX_PATH).
Zip, Unzip, ListZipContents, PreviewFiles, RemoveFiles
To exclude files based on criteria other than file names, refer to the filtering properties.