Create your first automation in just a few minutes.Try Studio Web

Compression

Compression

by Atul Trikha

StarStarStarStarStarStarStarStarStarStar

0

Activity

Downloads

1.9k

back button
back button
carouselImage0
next button
next button

Summary

Summary

Create and extract zip archives

Overview

Overview

The Compression custom activity is a simple to use component that provides activities for creating and extracting zip archives. i.e., Zip and Unzip.

It contains the following two activities:

1. Compress: It compresses the content of a folder into a zip archiveInput

Input Parameters:

  • SourceDirectoryName (String): The path for the directory that needs to be archived, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.
  • DestinationArchiveFileName (String): The path where the archive will be created, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.

Output Parameters:

  • Result (Boolean): If the process executed successfully.

Exceptions:

  • PathTooLongException: In SourceDirectoryName or destinationArchiveFileName, the specified path, file name, or both exceed the system-defined maximum length.
  • DirectoryNotFoundException: SourceDirectoryName is invalid or does not exist (for example, it is on an unmapped drive).
  • IOException: DestinationArchiveFileName already exists or a file in the specified directory could not be opened.
  • UnauthorizedAccessException: DestinationArchiveFileName specifies a directory or the caller does not have the required permission to access the directory specified in SourceDirectoryName or the file specified in DestinationArchiveFileName.
  • NotSupportedException: SourceDirectoryName or destinationArchiveFileName contain an invalid format or the zip archive does not support writing.

2. Extract: It extracts the content to a folder.

Input Parameters:

  • SourceArchiveFileName (String): The path for the archive that will be extracted.
  • DestinationDirectoryName (String): The path for the directory where to add the extracted files, specified as a relative or absolute path. A relative path is interpreted as relative to the current working directory.

Output Parameters:

  • Result (Boolean): If the process executed successfully.

Exceptions:

  • PathTooLongException: The specified path in DestinationDirectoryName or SourceArchiveFileName exceeds the system-defined maximum length.
  • DirectoryNotFoundException: The specified path is invalid (for example, it is on an unmapped drive).
  • IOException: The directory specified by DestinationDirectoryName already exists or the name of an archive entry is empty, contains only white space. It contains at least one invalid character or extracting an archive entry would create a file that is outside the directory specified by DestinationDirectoryName.
  • (For example, this might happen if the entry name contains parent directory accessors.) An archive entry to extract has the same name as an entry that has already been extracted from the same archive.
  • UnauthorizedAccessException: The user does not have the required permission to access the archive or the destination directory.
  • NotSupportedException: DestinationDirectoryName or SourceArchiveFileName contain an invalid format.
  • FileNotFoundException: SourceArchiveFileName was not found.
  • InvalidDataException: The archive specified by SourceArchiveFileName is not a valid zip archive. An archive entry was not found or was corrupt. An archive entry was compressed by using a compression method that is not supported.

Features

Features

Compression is an easy to component that provides activities for creating and extracting zip archives. i.e., Zip and Unzip

Additional Information

Additional Information

Dependencies

System.IO.Compression System.IO.Compression.FileSystem

Code Language

Visual Basic

Runtime

Windows Legacy (.Net Framework 4.6.1)

Publisher

Atul Trikha

Visit publisher's page

License & Privacy

MIT

Privacy Terms

Technical

Version

1.0.5

Updated

February 18, 2020

Works with

Studio: 19.10 - 22.10

Certification

Silver Certified

Support

UiPath Community Support

Resources