Unzip files Action is a constituent part of Automation Workshop, a business process automation (BPA) software for Windows. With the Unzip files Action you can automatically extract files and folders from archives without user presence. Zip uncompression process or unzipping can be started manually by user, or automatically, on schedule or some event in the system.
For example, file unzipping can start automatically when a new zip file is detected in specified folder by File / Folder Watcher, the file monitoring Trigger, or upon user login, during Windows startup or on simple or advanced schedule. Also, the Unzip files Action can be a part of the Task that contains multiple Actions, and thus extract compressed files from archive after another Action has finished its operations. This way, the automatic file unzipping can start after an archive file has been copied to specified folder, or when a third-party application has completed, or after any other Automation Workshop Action.
The automatic Unzip files Action features the following uncompression options:
Provided the automatic character of the Unzip files Action application, it features some specific options that you would not find in most unzip programs that are operated by direct user interaction:
The goal of automatic zip file uncompression tutorial. This tutorial will lead you through the creation of automation Task that will convert password unprotected tar.gz file to encrypted zip archive with removing
*.tmp (temporary files) that might have accidentally gotten into the original archive.
Let us assume the following parameters for this sample Task:
C:\Tar\folder for new tar.gz archives.
C:\Tar\folder, the Trigger automatically launches the Task.
C:\Uncompressed\folder into a file (named after the original tar.gz archive) and put that file in the
C:\Uncompressed\for the next Task execution.
This tutorial on how to convert tar.gz to zip files (by uncompressing tar.gz and compressing zip archives) consists of the following user steps:
Creating a Task. Let us begin with creating a new automated Task, a primary unit of Automation Workshop. Open Automation Workshop Manager - the main interface of the business process automation application. Irrelevantly whether you choose the New Task option from File menu, click Ctrl+N, or right-mouse click in the Task pane, it will open the Task Wizard in the Welcome tab.
Adding the File / Folder Watcher Trigger for monitoring the folder. Once in the Welcome tab of Task Wizard, you can get acquainted with some basic concepts and click Next to go to the Triggers tab. Click the Add button and choose File / Folder Watcher from the list of available Triggers.
Once in File / Folder Watcher Trigger, let's setup monitoring of
C:\Tar\ folder for Tar.gz files. First, specify the Folder to watch, namely, the
Second, let us specify that the File / Folder Watcher Trigger monitors only for Tar.gz files. Specify the Include mask in the Filter tab to watch for
*.Tar.gz (all Tar.gz files). Click OK and notice that the File / Folder Watcher file monitor has been added to the Triggers tab. Click Next to proceed to the Actions tab.
Adding the Unzip files Action for automatic tar.gz decompression. Once in the Actions tab, let us start to add the Actions. Choose the Unzip Files from the Compression category in the list of available Actions.
First, let us specify which file to automatically decompress. Click on the Variable Wizard button next to Archive file parameter. In Variable Wizard choose File / Folder Watcher in the Trigger category.
This effectively creates a link between File / Folder Watcher and Unzip Files. When a new Tar.gz file will arrive to the
C:\Tar\ folder, the File / Folder Watcher Trigger will detect it and store its name in a dynamic variable. The stored dynamic variable will subsequently be retrieved by Unzip files Action and automatically used to specify which file exactly to uncompress.
Now let us specify the destination folder to which the archive will be uncompressed. Browse to the
C:\Uncompressed\ folder (create if necessary).
Note that Filename is a dynamic variable that depends on the file that is detected by file monitor File / Folder Watcher, not a fixed value which refers to a file with constant name. Click OK to return to the Actions tab of Task Wizard.
Adding the Zip files Action for automatic zip file compression. Now, let us add the Zip files Action. Specify files to compress parameter by entering
C:\Uncompressed\*.* (all files in the
As a second step, we need to specify into which archive the contents of the original Tar.gz file (that are currently located in the
C:\Uncompressed\ folder). Enter
C:\Zip\ into the destination archive field and click the Variable Wizard. Since we wanted the zip file to have the same name as tar.gz archive, choose the Filename preset of File / Folder Watcher in Triggers category. Disable the extension since it will be replaced by .zip in the new archive.
Return to the configuration of Zip files Action. Notice the dynamic Filename variable in the destination archive parameter that will assign the newly created zip file the name of original tar.gz archive.
Let us configure the file encryption in the Options tab. Choose the ultra-secure AES-256 encryption key and write a strong password (preferably consisting of many alphanumerical characters along with special symbols).
Go to the Filter tab to configure the exclude mask for automatic exclusion of
*.tmp (temp files) from being added to the zip archive.
Finish the configuration of the Zip files Action.
Adding the Delete files Action to delete the contents of the folder. Let us add the Delete files Action that will automatically delete all files in the
C:\Uncompressed\ folder to clear it for the next tar.gz archive conversion to zip archive. Choose the Delete file Action from the File / Folder category. Provide
C:\Uncompressed\*.* as the File parameter.
Go to the Options tab of Delete file Action and enable the Include subfolders option to automatically delete subfolders and files within them. Click OK to save the settings and return to Task Wizard.
The structure of the Task is now in place. However now we should configure the Task to avoid multiple simultaneous executions which could lead to accidental mixing of files from multiple archives.
How to disable simultaneous Task execution to avoid mixing files from various tar archives? Click Next to go to Task's Run As settings, then to the Reports tab, to the Task tab where we can give Task a name, e.g. Convert tar.gz to zip automatically, and write an optional description.
Click Next to go to the Finish tab and click on Advanced options.
Once in the Advanced options of the Task, go to the Settings tab and change the multiple instances execution setting If an instance of already running (or queued) task is being executed from the default Run task in parallel to Queue a new task instance until existing task finishes setting which allows only one instance of the Task running at a time.
Note that the same Task properties as currently opened are accessible any time after saving the Task. Click OK to save and activate the Task.
Conclusion. We have created a Task to automatically convert tar.gz files to zip files (with removing temp files during the process). During the process we have added a File / Folder Watcher Trigger that automatically monitors the
C:\Tar\ folder for new tar.gz files (
*.tar.gz file mask). When a file arrives, the Trigger launches the Task which, in turn, sequentially performs the following Actions:
C:\Uncompressed\folder to zip file in
C:\Uncompressed\folder from all its contents.
Note that likewise it is possible to extend the Task in numerous ways by adding more sequential Actions. For instance, the created zip archive can be automatically moved to another folder, sent by email, reported by email, passed to external application, etc.
The File / Folder Watcher file monitoring Trigger is connected with Unzip files Action so that the latter receives the tar.gz archive name and path from the former. Also, the Zip files Action retrieves the original tar.gz archive file name from File / Folder Watcher to use it as a name for newly created zip file. Only the Delete file Action unconditionally deletes contents of the
C:\Uncompressed\ folder without relying on some preceding Trigger or Action.
Also, we have seen how to choose between multiple Task instances running in parallel and queuing them one after another for sequential execution which plays a key role in this Task to prevent it from unwanted mixing of files from various archives.
If you have any questions, please do not hesitate to contact our support team.