OS: | Windows | ||||
Type: | A Windows PowerShell script | ||||
Language: | Windows PowerShell | ||||
Description: | Unzip-Silently uses the Shell.Application to unzip files that are defined with the -FilePath parameter. By default the -FilePath parameter accepts plain filenames (then the current directory gets searched for the inputted filename) or 'FullPath' filenames, which include the path to the file as well (such as C:\Windows\archive.zip ). If the -Include parameter is used, also paths to a folder may be entered as -Filepath parameter values, and then all the zip files inside the first directory level of the specified folder (as indicated by the common command 'dir ' for example) are added to the list of files to be processed. Furthermore, if the -Recurse parameter is used in adjunction with the -Include parameter in the command launching Unzip-Silently, the search for zip files under the directory, which is defined with the -FilePath parameter, is done recursively (i.e. the zip files are searched from every subfolder level).
The naming principle of the new folders follows the original names of the zipped files. The contents of the zip files are extracted to new folders, which are created by default to the same folder, where each zip file is located. The default output destination folder, under which the new folder(s) is/are created, may be changed with the -Output parameter. When creating new folders Unzip-Silently tries to preserve pre-existing content rather than overwrite any existing folders (or files eventually), so if a folder seems to already exist, a similarly named folder with a (possibly higher) number is created instead.
After the contents of the zip files has been extracted, the MD5 and SHA256 hash values of the zip files (in machines that have PowerShell version 4 or later installed with the inbuilt Get-FileHash cmdlet and in machines that are running PowerShell version 2 or 3 by calling a Check-FileHash function, which is based on Lee Holmes' Get-FileHash script in "Windows PowerShell Cookbook (O'Reilly)") along with other performance related info is displayed in console.
To delete the original zip file(s), the parameter -Purge may be added to the launching command. Please note that if any of the individual parameter values include space characters, the individual value should be enclosed in quotation marks (single or double) so that PowerShell can interpret the command correctly. |
||||
Homepage: | https://github.com/auberginehill/unzip-silently
Short URL: http://tinyurl.com/zkg7s9l |
||||
Version: | 1.0 | ||||
Sources: |
|
||||
Downloads: | For instance Unzip-Silently.ps1. Or everything as a .zip-file. |
π |
|
---|---|
|
β‘οΈ |
|
---|---|
|
|
π | To open this code in Windows PowerShell, for instance: | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Find a bug? Have a feature request? Here is how you can contribute to this project:
Bugs: | Submit bugs and help us verify fixes. | |
Feature Requests: | Feature request can be submitted by creating an Issue. | |
Edit Source Files: | Submit pull requests for bug fixes and features and discuss existing proposals. |