Compress and decompress file
To compress and decompress file in Powershell is quite straight forward.
#compress "test" folderCompress-Archive -Path "D:\temp3\test" -DestinationPath "D:\temp3\myFirstZipFile.zip"
#decompress the file to "testFolder" folder.
Expand-Archive -Path "D:\temp3\myFirstZipFile.zip" -DestinationPath "d:\temp3\testFolder"
# to decompress the file back to the
Expand-Archive -Path "D:\temp3\myFirstZipFile.zip" -DestinationPath "d:\temp3\"
#compress "test" folderCompress-Archive -Path "D:\temp3\test" -DestinationPath "D:\temp3\myFirstZipFile.zip"
#decompress the file to "testFolder" folder.
Expand-Archive -Path "D:\temp3\myFirstZipFile.zip" -DestinationPath "d:\temp3\testFolder"
# to decompress the file back to the
Expand-Archive -Path "D:\temp3\myFirstZipFile.zip" -DestinationPath "d:\temp3\"
Comments
Post a Comment