ZIP

Frends.Zip.CreateArchive / 1.3.0

Summary

Packs files or whole folders into a ZIP archive, optionally flattening the folder structure, renaming duplicates and protecting the result with a password. The source files can be removed once packed.

Typical use — bundling a batch for transfer as a single unit; note that a ZIP password is weak protection, so use PGP for anything genuinely sensitive

Details

Frends version
5.5 and newer
Agent
Crossplatform
Target framework
net6.0

Source properties.

Name Type Default Example Description
SourceType SourceFilesType PathAndFileMask PathAndFileMask

Source files input type.

Possible values:

  • PathAndFileMask: Source files input type.

  • FileList: Source files input type.

Directory String C:\example\folder\

Source directory.

FileMask String * *

The search string to match against the names of files. This parameter can contain a combination of valid literal path and wildcard (* and ?) characters (see Remarks), but doesn't support regular expressions. The default pattern is "*", which returns all files.

IncludeSubFolders Boolean False false

Indicates if subfolders and files should also be zipped.

FlattenFolders Boolean False false

Choose if source folder structure should be flatten when zipped.

FilePathsList List<String> new List<string> { Directory.GetFiles(_dir, "*.txt")[0] };

List of full file paths to include in zip.

RemoveZippedFiles Boolean False false

If true, files added to the zip are removed from source directory.

An unhandled error has occurred. Reload 🗙