NetCmdlets 2016
NetCmdlets 2016
Questions / Feedback?

Add-Zip Cmdlet

Parameters   Output Objects   Configuration Settings  

The Add-ZIP cmdlet allows for the appending of a file to an existing ZIP, JAR, or TAR archive.

Syntax

Add-Zip [parameters]

Remarks

The format of the archive is specified by the Format parameter.

For the Zip format, the cmdlet uses the Deflate algorithm specified in RFC 1951 for compression, and writes output compatible with PKZip, WinZip, etc.

For Jar files, the operation of the cmdlet is similar to that of the Zip Format. .class and other files may be added into a .jar file, and then may be imported into Java code or executed by a JVM.

When compressing Tar files, the interface is identical to that of the Zip Format and is the same whether GZip compression is used or not.

The cmdlets support pipeline input for some of their parameters. Prebuilding an object and piping it to the cmdlet is very useful, but should be used with caution to prevent security conflicts. Steps have been taken to decrease the risk of a possibly accidental pipe to the cmdlet, for instance, the Credential parameter cannot be piped to the cmdlet and must be specified manually.

# add a file to an existing .zip archive
add-zip -Input newfile.txt -Output existingArchive.zip
# add a file to an existing .tar archive
add-zip -Input newfile.txt -Output existingArchive.tar
# add a file to an existing .zip archive with a password
add-zip -Input newfile.txt -Output existingArchive.zip -Password somepassword

Parameter List


The following is the full list of the parameters of the cmdlet with short descriptions. Click on the links for further details.

LogFileThe location of a file to which debug information is written.
ConfigSpecifies one or more configuration settings.
FileCompressedNameSpecifies the path and filename of the file in the archive.
FormatThe format of the compression used.
InputThe files to be added to the archive.
LogFileThe location of a file to which debug information is written.
OutputThe archive file.
OverwriteWhether or not to overwrite the archive.
PasswordThe password for the zip archive.
RecurseWhether or not to recurse into subdirectories.

Output Objects


The following is the full list of the output objects returned by the cmdlet with short descriptions. Click on the links for further details.

ZipFileReturned after appending file(s) to archive.

Configuration Settings


The following is a list of configuration settings for the cmdlet with short descriptions. Click on the links for further details.

CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
NetCmdlets 2016 - Version 16.0 [Build 6335]