Вы находитесь на странице: 1из 9

WZZIP reference

Page 1 of 9

WZZIP reference
Usage: wzzip [options] zipfile [@listfile] [files...] For information on the zipfile, listfile, and files components, see Using WZZIP. The options are as follows. Notes: Options are case sensitive. For example, -j and -J are different. "[]" indicates an optional element "|" indicates a choice between elements

-a

Add files (default action). wzzip -a test.zip *.txt This example adds all the *.txt files in the current folder to test.zip. Note: this is the default action and does not need to be stated. wzzip test.zip *.txt Gives the same results as the example above. wzzip -a -m test.zip *.txt This example moves all the .txt files to test.zip and removes them from the disk. Related options

-a+

Remove the archive attribute from each file after adding it to the Zip file. As WinZip adds a file during the zipping process, the file's archive attribute is reset. wzzip -a+ test.zip *.txt This example adds all the *.txt files in the current folder to test.zip and then resets the archive attribute. Related options

-b[drive|path]

Use another drive for the temporary Zip file. Since WZZIP creates a new, temporary Zip file when it updates a file, sufficient space must be available on the current drive for that file. This option enables you to use another drive for that purpose when space considerations force the issue. wzzip -bd:\temp test.zip c:\temp\*.txt This example creates the temporary Zip file in the d:\temp folder and adds all the text files in the c:\temp folder to the test.zip file.

-c

Create or edit existing comments for all the files in the Zip file. wzzip -c d:\temp\test.zip Used to add a comment to files contained within a Zip file wzzip -c -z d:\temp\test.zip Adding the '-z' option allows you to create a new, or edit an existing, Zip file comment. Note: To view a file comment in Zip file, view the properties of the Zip file using -v. Related options

-C Create comments only for files being added that are not already in the Zip file.

mk:@MSITStore:C:\Program%20Files\WinZip\WZCLINE.CHM::/source/wzzip_com... 3/11/2009

WZZIP reference

Page 2 of 9

wzzip -C d:\temp\test.zip d:\*.txt Used to add a comment to files being added to an existing Zip file. All new .txt files being added will prompt for a comment. wzzip -C -z d:\temp\test.zip Allows you to edit the comment for the Zip file. Related options -d Delete specified file(s) from the Zip file. wzzip -d d:\temp.zip license.txt Removes the file license.txt from the temp.zip file wzzip -d d:\temp.zip @remove.txt Removes all files from the Zip file, temp.zip, that are listed in remove.txt. -ep -eb -ee -ex -en -ef -es -ez -e0 Set the compression level. -ep: maximum (PPMd) (requires WinZip 10.0 or higher, WinZip Command Line Support Add-On 2.0 or higher, or compatible Zip utility to extract) -eb: maximum (bzip2) (requires WinZip 9.0 or higher, WinZip Command Line Support Add-On 1.1 or higher, or compatible Zip Utility to extract) -ee: maximum (enhanced deflate) (requires WinZip 8.1 or higher, WinZip Command Line Support Add-On 1.1 or higher, or a compatible Zip utility to extract) -ex: maximum (portable) -en: normal -ef: fast -es: super fast -ez: best method. This option instructs WinZip to choose the best compression method for each file, based on the file type. You may want to choose this option if compressed file size is a primary concern. Requires WinZip 11.0 or higher, WinZip Command Line Support Add-On 2.2 or higher, or compatible Zip utility to extract. -e0: no compression wzzip -ee d:\temp\test.zip *.gif Adds all .gif files in the current folder to the test.zip file using the enhanced deflate compression method. wzzip -e0 d:\temp\test.zip *.gif Adds all .gif files in the current folder to the test.zip file using no compression. -f Freshen: replace files that are already part of the Zip file and are newer on disk. wzzip -f d:\temp\test.zip *.txt Replaces any .txt files that are currently in test.zip with the newer .txt files found in the current folder. Files must have the same name in order for freshen to work. Related option -h -? -i[-] Show this help file Add files whose archive attribute is set. By default the archive attribute is then removed. Use the optional "-" suffix to leave the archive attribute on. wzzip -i d:\temp\test.zip *.txt Adds all *.txt files found in the current directory that have their archive attribute set to test.zip and then removes the archive attribute from the *.txt files.

mk:@MSITStore:C:\Program%20Files\WinZip\WZCLINE.CHM::/source/wzzip_com... 3/11/2009

WZZIP reference

Page 3 of 9

wzzip -i- d:\temp\test.zip *.txt Adds all *.txt files found in the current directory that have their archive attribute set to test.zip and then leaves the archive bit set on the *.txt files. Related options -jhrs Do not store hidden, read only, and system attributes in the Zip file. (-whs controls whether hidden and system files are added to the Zip file.) wzzip -jhrs d:\temp\test.zip *.* Add all files in the current folder, EXCEPT hidden and system files, to the test.zip. Hidden, system and read-only attributes are not maintained on files added to the Zip file. wzzip -jhrs -whs d:\temp\test.zip *.* Add all files in the current folder, INCLUDING system and hidden files, and if applicable, remove the hidden, system and read only file attributes. Related options -Jhrs Store hidden, read only, and system attributes in the Zip file (default). (-whs controls whether hidden and system files are added to the Zip file.). wzzip -Jhrs d:\temp\test.zip *.* Add all files in the current folder to test.zip, EXCEPT hidden and system files, in the current folder to test.zip. Maintain the read only attribute if applicable. wzzip -Jhrs -whs d:\temp\test.zip *.* Add all files in the current folder to test.zip, INCLUDING hidden and system files. Maintain the hidden, system, and read only attribute of files that are added to the Zip file. Related options -k Do not update the Zip file's file date; retain the original date. wzzip -k d:\temp\test.zip *.* Add all files in current folder to test.zip (existing Zip file), and maintain original file date. Related option -m[f|u] Move files to the Zip file. When the Add, Freshen, or Update operation is complete, the original files are deleted. wzzip -m d:\temp\test.zip *.* Move all files in current folder to test.zip (original files are deleted from system) wzzip -mf d:\temp\test.zip *.* If file exists in test.zip and date is newer on disk then move file to test.zip. If file exists in test.zip and date is older or the same on disk then just delete file from disk. If file does not currently exist in test.zip, ignore it. wzzip -mu d:\temp\test.zip *.* Move all files to test.zip. Those files that already existed in test.zip and are newer on disk, update those files. Any new files found in the current folder are also moved to test.zip. Files on disk are deleted. Related option -o Change the Zip file's file date to the same as the newest file in the Zip file.

mk:@MSITStore:C:\Program%20Files\WinZip\WZCLINE.CHM::/source/wzzip_com... 3/11/2009

WZZIP reference

Page 4 of 9

wzzip -o d:\temp\test.zip This operation changes the date and time of the Zip file to match the date and time of the newest file contained within the Zip file. Note: The -o switch is used as part of an add operation. If no exclusion switches are used, WZZIP will assume '*.*' and will add any files existing in the current folder. Related options -p|P Store folder names. A lower case p stores only the names of folders recursed (subfolders included) via the -r option, while an upper case P stores all folder information specified on the command line or in the listfile. Use with the -r option. In the following examples, assume this folder structure: Level1\LevelA Level1\LevelB Level1 contains the file file1.txt Level1\LevelA contains two files, a1.txt and a2.txt Level1\LevelB contains two files, b1.txt and b2.txt wzzip -p -r d:\temp\test.zip d:\level1\*.* This creates test.zip containing file1.txt, folder Level1\LevelA with files a1.txt and a2.txt, and folder Level1\LevelB with files b1.txt and b2.txt. Note that the folder Level1 itself does not get included. Extracting from test.zip will create the following files and folders in the extract-to folder: File1.txt LevelA\a1.txt LevelA\a2.txt LevelB\b1.txt LevelB\b2.txt wzzip -P -r d:\temp\test.zip d:\level1\*.* This creates test.zip with folder Level1 containing file file1.txt, folder Level1 \LevelA containing files a1.txt and a2.txt, and folder Level1\LevelB containing files b1.txt and b2.txt. Extracting from test.zip will create the following files and folders in the extract-to folder: Level1\file1.txt Level1\LevelA\a1.txt Level1\LevelA\a2.txt Level1\LevelB\b1.txt Level1\LevelB\b2.txt Related option -r Recurse into subfolders (include subfolders). This option requires the -p or -P option. See examples under -p|P option above. Related option -s[password] Specifies use of encryption. If the password is not provided, the add-on will prompt for one. Passwords provided on the command line that contain spaces must be enclosed in double quotes. Please read this important information About Encryption. Note: the -yc option (below) can be used to change the encryption method to one of the AES encryption methods. wzzip -spassword d:\temp\test.zip *.*

mk:@MSITStore:C:\Program%20Files\WinZip\WZCLINE.CHM::/source/wzzip_com... 3/11/2009

WZZIP reference

Page 5 of 9

Zip all files in current folder into test.zip with Zip 2.0 encryption and a password of password. wzzip -spassword -yc d:\temp\test.zip *.* Zip all files in current folder into test.zip with AES 128 (default method for -yc option) encryption and give all files in test.zip a password of password. wzzip -spassword -ycAES d:\temp\test.zip *.* Zip all files in current folder into test.zip with AES 128 encryption and give all files in test.zip a password of password. wzzip -spassword -ycAES128 d:\temp\test.zip *.* Zip all files in current folder into test.zip with AES 128 encryption and give all files in test.zip a password of password. wzzip -spassword -ycAES256 d:\temp\test.zip *.* Zip all files in current folder into test.zip with AES 256 encryption and give all files in test.zip a password of password. Related option -t[f|d][date] Include files with a date equal to or more recent than the date specified (current date if no date specified). Date formats without the f modifier depend on country settings; examples with and without delimiters: United States: mmdd[yy]yy or [m]m/[d]d/[yy]yy Japan: [yy]yymmdd or [yy]yy/[m]m/[d]d Most of Europe: ddmm[yy]yy or [d]d.[m]m.[yy]yy valid delimiters are / . or The f modifier indicates that the date is specified in either of the following countryindependent formats, regardless of the system's locale settings: [yy]yymmdd [yy]yy-[m]m-[d]d Note that years can be specified as two or four digits. Two-digit years less than 80 are assumed to be 20##, while two-digit dates greater than or equal to 80 are assumed to be 19##. The d modifier indicates that the date specified is the number of days elapsed instead of a specific date. wzzip -t090104 d:\temp\test.zip *.* Add all files in current folder to test.zip that have a date equal to or more recent than September 1, 2004. Note: This date format is country specific, in this example U.S. format is used. wzzip -tf20040901 d:\temp\test.zip *.* Add all files in current folder to test.zip that have a date equal to or more recent than 2004 September 01. Note: this date format is NOT country specific. wzzip -td8 d:\temp\test.zip *.* Add all files in the current directory that are 8 days old or more recent. The d modifier allows you to specify a number of days rather than a date. Related option -T[f|d][date] Include files older than the date specified (current date if no date specified) Date formats without the f modifier depend on country settings; examples with and without delimiters: United States: mmdd[yy]yy or [m]m/[d]d/[yy]yy

mk:@MSITStore:C:\Program%20Files\WinZip\WZCLINE.CHM::/source/wzzip_com... 3/11/2009

WZZIP reference

Page 6 of 9

Japan: [yy]yymmdd or [yy]yy/[m]m/[d]d Most of Europe: ddmm[yy]yy or [d]d.[m]m.[yy]yy valid delimiters are / . or The f modifier indicates that the date is specified in either of the following countryindependent formats, regardless of the system's locale settings: [yy]yymmdd [yy]yy-[m]m-[d]d Note that years can be specified as two or four digits. Two-digit years less than 80 are assumed to be 20##, while two-digit dates greater than or equal to 80 are assumed to be 19##. The d modifier indicates that the date specified is the number of days elapsed instead of a specific date. wzzip -T090104 d:\temp\test.zip *.* Add all files in current folder to test.zip that have a date equal to or older than September 1, 2004. Note: This date format is country specific, in this example U.S. format is used. wzzip -Tf20040901 d:\temp\test.zip *.* Add all files in current folder to test.zip that have a date equal to or older than 2004 September 01. Note: this date format is NOT country specific. wzzip -Td8 d:\temp\test.zip *.* Add all files in the current directory that are 8 days old or older. Note: the 'd' modifier allows you to specify a number of days versus a date. Related option -u Update: add files that are new or have changed. This command adds to the Zip file any files that are not already in the Zip file, and replaces any files that have a more recent date on disk. Put another way, this command is the same as -a (Add) except that it skips files that are already in the Zip file and have the same date in the Zip file and on disk. wzzip -u d:\temp\test.zip *.* Used to update existing Zip files. The above adds new files or updated files found in the current folder to test.zip. If a file currently exists in the Zip file, only add it if the date on disk is newer than the date of the file in the Zip file. Related option -v[b|t] [r][m][c] [d|e|n|o|p|s] [f] View the list of files in the Zip file in one of the following formats: normal, brief, or technical. r reverses the sort order, m (more) pauses after each screen, and c displays any file comment. You can optionally sort by date, extension (file type), name, original order, percentage compression, or uncompressed size. The f modifier causes the date to be displayed in the format yyyy-mm-dd regardless of the local system's display settings. wzzip -v d:\temp\test.zip This allows you to view the contents of the Zip file without unzipping it. A listing of the files and file information (File length, Compression method, file size, compression ratio, file date, file time, file CRC-32, file attribute, file name) are returned to the screen. wzzip -v d:\temp\test.zip >test.txt Redirects all file information for test.zip to a file called test.txt. This may be easier to read for large Zip files. wzzip -vb d:\temp\test.zip (brief file description) A listing of the files and file information (File length, file size, compression ratio, file

mk:@MSITStore:C:\Program%20Files\WinZip\WZCLINE.CHM::/source/wzzip_com... 3/11/2009

WZZIP reference

Page 7 of 9

date, file time, file name) are returned to the screen. wzzip -vt d:\temp\test.zip (technical description) Get a listing of the files and file information (File name, file type, attribute, file date and time stamp, compression method, compressed file size, uncompressed size, 32bit CRC value, created by, needed to extract) returned to the screen. wzzip -vtr d:\temp\test.zip Get a technical listing of files and show them in reverse sort order. wzzip -vm d:\temp\test.zip Get a list of files contained within test.zip and display the list one screen at a time. wzzip -vtmd d:\temp\test.zip Get a technical listing of files contained within the Zip file and display one screen of data at a time. Sort the file information by date. wzzip -vbme d:\temp\test.zip Get a brief listing of files contained in test.zip, display one screen of data at a time and sort the file listing by file type/extension). Related options -vi[m] View the Zip file's internal information. Use the optional "m" suffix to prevent text from scrolling off the screen. wzzip -vim d:\temp\test.zip Give a listing of the Zip files information similar to the properties/details function in the GUI interface. The 'm' operator gives one screen full at a time. Related options -whs Include hidden and system files in the zipping process. wzzip -whs d:\temp\test.zip *.* Zip all files in the current folder including system and hidden files. Related options -Whs Exclude hidden and system files from the zipping process (default). wzzip -Whs d:\temp\test.zip *.* Zip all files in the current folder except system and hidden files. Note: this is the default action and is assumed even if -Whs does not appear in the command. Related options -x<filename> Exclude the specified file(s) from the zipping process. Wildcards are allowed. wzzip -x*.txt d:\temp\test.zip *.* Creates test.zip and includes all files in the current folder except .txt files. wzzip -xd:\taxes\2004\*.* d:\taxes\taxarchive.zip d:\taxes\*.* Creates a Zip file in d:\taxes called taxarchives.zip and includes all folders and files in the d:\taxes folder structure EXCEPT the folder d:\taxes\2004. Note: -x*\ can be used to exclude empty folders. Related options -x@listfile Exclude the files listed in the specified listfile from the zipping process. This listfile uses the same format as the listfile used to specify files to be zipped (see Using WZZIP). Note: To exclude an entire folder use foldername\*.*.

mk:@MSITStore:C:\Program%20Files\WinZip\WZCLINE.CHM::/source/wzzip_com... 3/11/2009

WZZIP reference

Page 8 of 9

wzzip -x@exclude.txt c:\backup\docs.zip c:\workdocs\*.doc This command creates docs.zip in the c:\backup folder and contains all *.doc files in the c:\workdocs folder EXCEPT those listed in the exclude.txt file. Related options -yb[c] Automatic, non-interactive ("batch" mode) handling of prompts. If a prompt is issued, the operation terminates with error level 250. Use the optional c suffix to automatically continue with a "yes", "ok" response instead of terminating.

-yc Override the default Zip 2.0 standard encryption method used by the -s option. [AES|AES128|AES256] (requires WinZip 9.0 or higher, WinZip Command Line Support Add-On 1.1 or higher, or a compatible Zip utility to extract); the -yc option must be entered after the -s option. -yc, -ycAES, and -ycAES128 all change the encryption method to WinZip's 128-bit AES encryption. -ycAES256 changes the encryption method to WinZip's 256-bit AES encryption. Please read this important information About Encryption. See -s command above for examples. Related option -yk Force the use of MS-DOS (8+3) file names within the Zip file. wzzip -yk 8dot3.zip f:\testing\ Adds all files in f:\testing to 8dot3.zip with a maximum of eight character files names and 3 character extensions (ie. Progra~1.doc,). No long file names will be used on files added to this Zip file. -yp Display a "Press any key to continue" prompt when the operation completes. This is particularly useful when running WZZIP from Start Menu's Run dialog box or from the "start" command. Split an existing Zip file into separate files of a specified size. The name of each separate file will be based on the name used for the destination file name (parameter "zipfile" shown in example at beginning of this page). The size is the number of KBs for each file. If the size is omitted, the function is similar to the span option and the destination file name must be on a removable disk. Each removable disk except for the first will have any files deleted from it before the spanned Zip file is written. For more information see Splitting Zip Files. wzzip -ys1024 f:\examples\large.zip f:\testing\split Split the Zip file large into 1024KB sections called Split (split.z01, split.z02, etc. split.zip). Related option -yt[date] Change the date and time for all files in a Zip file to the current date and time or the specified date and time. If the date is omitted the current date and time is used. The date and time format is mmddHHMM[yyyy]. If the year is omitted, the current year is used. The hour, HH, must be specified in 24 hour notation. wzzip -yt080515482004 f:\examples\starter.zip f:\testing Add the files in f:\testing to the Zip file f:\examples\starter.zip with files dates and times of 08/05/2005 3:48pm. Related option -yx Store extended time stamps with zipped files. NTFS disk drives store three time stamps for each file: when the file was created, when it was last accessed, and when it was last modified. The -yx option instructs WinZip to store these extended time stamps with each file zipped from an NTFS drive. To extract files using the extended time stamps, use WZUNZIP's -yx option. wzzip -yx f:\examples\starter.zip f:\testing

-ys[size]<filename>

mk:@MSITStore:C:\Program%20Files\WinZip\WZCLINE.CHM::/source/wzzip_com... 3/11/2009

WZZIP reference

Page 9 of 9

Add the files in f:\testing to the Zip file f:\examples\starter.zip using NTFS time stamps. -z Create or edit a Zip file comment. wzzip -z c:\example.zip Allows the user to edit the Zip file comment. Related options -&[w] [s[drive]] Span to multiple removable disks. Use the optional w modifier to wipe out all files on the removable disk. Use the optional s modifier to zip an entire disk with subfolders. Note: Windows 2000/XP/Vista users must specify "-&" (including the quotation marks) or -^& due to cmd.exe requirements. wzzip -^&ws a:\newdrive.zip c:\ This command will zip the entire C: drive, including the subfolder structure, onto the A: drive to a Zip file named newdrive.zip. This Zip file will span multiple diskettes. This command is specific to spanning a Zip file over multiple removable disks. Related options -$[drive] Save volume label as a part of the Zip file; the current drive is used if not otherwise specified. wzzip -$c a:\example.zip c:\letters Zip all files in c:\letters into a Zip file on the A: drive called example.zip, then add the C: drive's volume label to the Zip file. -@listfile Create a file listing all the files that would be archived if this option were not specified. Hint: remember to use the leading dash to create a list. Leave out the leading dash to use a list of files in a WZZIP command. wzzip -@c:\report.txt Q2.zip c:\Q2expenses\*.* Create a text file, c:\report.txt, that contains a list of the files found in c:\Q2expenses that would be contained in the Zip file Q2.zip if you actually created a Zip file. Related options -^ Display the WZZIP command line on your screen. Note: Windows 2000/XP/Vista users must specify "-^" ( including the quotation marks) or -^^ due to cmd.exe requirements) wzzip -^^ -Pr d:\temp\test.zip d:\level1\*.* This command will display the command line statement used to create the Zip file after the WinZip Command Line Support Add-On program information is displayed and prior to the start of the list of files being zipped.

mk:@MSITStore:C:\Program%20Files\WinZip\WZCLINE.CHM::/source/wzzip_com... 3/11/2009

Вам также может понравиться