WinZip Command Line 4.0 Parameters

IT Support Forum Forums Windows Windows 10 Applications WinZip Command Line 4.0 Parameters

This topic contains 0 replies, has 1 voice, and was last updated by  Webmaster 11 months ago.

  • Author
    Posts
  • #1551

    Webmaster
    Keymaster

    You can’t see the command line parameters when you do winzip /? or /help in WinZip Command Line version 4.0. So for your convenience, here are all the WinZip command Line parameters available in WinZip Command Line 4:

       wzunzip [options] zipfile [@listfile] [[drive:][\][path][\]] [files...]

    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

     

    -c[m] Display the contents of files on the screen. Use the optional “m” suffix to prevent text from scrolling off the screen.

      wzunzip -cm a:\example.zip readme.txt

    Use this command to type out the contents of a particular file within a Zip file. This example will send the content of the file readme.txt to the screen for you to read and only display one screen full at a time. After each screen full of text is presented, you are prompted to hit a key to continue.

    Related options
    -d Recreate the folder structure that is stored within the Zip file.

      wzunzip -d a:\2007taxinfo.zip c:\taxes2007

    The file and folder structure that exists in the Zip file, a:\2007taxinfo.zip, will be maintained when the files are extracted to the folder c:\taxes2007.

    Related options
    -e Extract files (default action).

      wzunzip -e a:\spring2007.zip c:\semesters\spring05

    This command extracts files in a:\spring2007.zip to the c:\semesters\spring05 folder. If files with the same name already exist in the c:\semesters\spring05 folder, you will be prompted whether to overwrite those files or leave the existing files.

    -f Extract only those files that currently exist in the target folder (“freshen”). If the Zip file contains a newer version of a file that already exists in the target folder, it will be extracted, replacing the older version. No files are extracted from the Zip file that do not already exist in the target folder.

      wzunzip -f "c:\my documents\spring2007.zip" c:\semesters\spring05

    This example will extract, from c:\my documents\spring2007.zip, ONLY those files that are newer than the files that currently exist in c:\semesters\spring05.

    Related options
    -h
    -?
    Show this help file.
    -jhrs Do not set hidden, read only, and system attributes on files during the unzipping process (default). In other words, ignore any attributes stored in the Zip file.

      wzunzip -jhrs d:\temp\test.zip *.*

    Extract all the files in test.zip to the current folder and DO NOT maintain any read-only, system or hidden file attributes that may exist on files within the Zip file.

    Related option
    -Jhrs Restore the hidden, read only, and system attributes on files during the unzipping process. In other words, use any attributes stored in the Zip file.

      wzunzip -Jhrs d:\temp\test.zip *.*

    Extract all the files in test.zip to the current folder and DO maintain any read-only, system or hidden file attributes that may exist on files within the Zip file.

    Related option
    -n Unzip only newer files. This option updates existing files if the archived file is newer and creates new ones if they do not already exist.

      wzunzip -n "c:\my documents\spring2007.zip" c:\semesters\spring05

    This example will extract, from c:\my documents\spring2007.zip, ONLY those files that are newer than the files that currently exist in c:\semesters\spring05 OR that do not already exist in the c:\semesters\spring05 folder.

    Related options
    -o[-] Overwrite existing files without a prompt (automatically reply “Yes” to each overwrite prompt). Use the optional “-” suffix to automatically reply “No” to each overwrite prompt.

      wzunzip -o "c:\my documents\spring2007.zip" c:\semesters\spring05

    Extract all files from the Zip file c:\my documents\spring2007.zip into c:\semesters\spring05 including those files with the same name as files that already exists in that folder.

      wzunzip -o- "c:\my documents\spring2007.zip" c:\semesters\spring05

    Extract all files from the Zip file c:\my documents\spring2007.zip into c:\semesters\spring05 except those files with the same name as files that already exists in that folder.

    Related options
    -p Print a file. The contents of the file are sent directly to the LPT1 printer port; therefore, this option should be used to print ASCII text files only, and only if a printer that can print ASCII text is attached directly to LPT1. It is not intended for use in printing data files such as spreadsheets or word processor documents.

      wzunzip -p "c:\my documents\spring2007.zip" agenda.txt

    This will send a printout of the file agenda.txt that is contained within the Zip file c:\my documents\spring2007.zip to lpt1 to be printed.

    -s[password] Specify a password (if no password is given, a prompt will be generated). Passwords containing spaces or reserved DOS characters (for example &, <, or >) must be enclosed in double quotes.

      wzunzip -s123456789 c:\seasons\spring05patterns.zip c:\seasons\spr05

    Extract all files contained within c:\seasons\spring05patterns.zip to the c:\seasons\spr05 folder. Use the password 123456789 to extract the file from the Zip file.

    -t Test the Zip file.

      wzunzip -t "c:\my documents\thesis.zip"

    This command will test the integrity of the Zip file c:\documents\thesis.zip.

    -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, while m (more) pauses after each screen. You can optionally sort by CRC, date, extension (file type), name, original order, percentage compression, or uncompressed size. The f option causes the date to be displayed in the format yyyy-mm-dd regardless of the local system’s display settings.

      wzunzip -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.

      wzunzip -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 long Zip files.

      wzunzip -vb d:\temp\test.zip (brief file description)

    A listing of the files and file information (file length, file size, compression ratio, file date, file time, file name) are returned to the screen.

      wzunzip -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, 32-bit CRC value, created by, needed to extract) returned to the screen.

      wzunzip -vtr d:\temp\test.zip

    Get a technical listing of files and show them in reverse sort order.

      wzunzip -vm d:\temp\test.zip

    Get a list of files contained within test.zip and display the list one screen at a time.

      wzunzip -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.

      wzunzip -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.

      wzunzip -vim d:\temp\test.zip

    Give a listing of the Zip file’s information similar to the information available in WinZip® Classic when using Test from the Actions menu with Include full details in the test output checked. The ‘m’ operator gives one screen full at a time.

    Related options
    -x<filename> Exclude the specified file(s) from the unzipping process. Wildcards are allowed.

      wzunzip -xsalary.xls c:\budgets\q2.zip

    Extract all files from c:\budgets\q2.zip to the current folder EXCEPT salary.xls.

    Related option
    [email protected] Exclude the files listed in the specified listfile from the unzipping process. The listfile uses the same format as the listfile of files to be unzipped (see Using WZUNZIP). Note: To exclude an entire folder use <foldername>\*.*.

      wzunzip [email protected] c:\backup\docs.zip c:\reports

    This command extracts all files from docs.zip to the c:\reports folder EXCEPT those files listed in the exclude.txt file.

    Related option -ya Enables hardware acceleration using any available GPU that supports OpenCL. There is no affect if OpenCL is not supported.

      wzunzip -ya c:\example.zip readme.txt

    Extracts readme.txt from example.zip using hardware acceleration.

    -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”, or “overwrite” response instead of terminating. Related option -ye Use the name of the Zip file as the name of the destination subfolder in the current folder. The contents of the Zip file are extracted to the subfolder. The subfolder will be created if it does not exist. This option provides a way to keep the contents of different Zip files separate when extracting from multiple Zip files at one time.

      wzunzip -ye c:\reports\q2inventory.zip c:\2007\q2

    Extract all files from q2inventory.zip to c:\2007\q2\q2inventory.

    -yo Overwrite hidden, system, and read-only files. If -yo is not specified, these files will be skipped.

      wzunzip -yo c:\reports\q2.zip c:\2007\q2

    Extract all files from q2.zip to c:\2007\q2 and if there are files contained within the Zip file that have the same name as files that exist in the c:\2007\q2 folder, overwrite them regardless of their file attribute.

    Related option -yO Include files with relative folder information containing “..” (parent folder) in the unzipping process when -d is also specified. If -yO is not specified, these files will be skipped.Note that the use of “..” is very unusual in Zip files and can produce undesirable results including the overwriting of important system files. You may wish to review the contents of the Zip file carefully before unzipping with -yO especially if you are uncertain of the Zip file’s source. Related option -yp Display a “press any key to continue” prompt when the operation completes. This is particularly useful when running WZUNZIP from Start Menu’s Run dialog box or from the “start” command.

      wzunzip -yp c:\reports\q2.zip c:\2007\q2

    Extract all files from q2.zip to c:\2007\q2 and when this operation is complete, display the prompt to “press any key to continue”. This is useful as a visual cue to tell the user that the operation has completed.

    -ys Replace any spaces in file names with underscore (“_”) character.

      wzunzip -ys c:\reports\q2inventory.zip c:\2007\q2\q2inventory

    Extract all files in q2inventory.zip to c:\2007\q2\q2inventory and if there are any files within the Zip file that have spaces in their names, replace the spaces with an underscore character. For example, “flat screen monitors.xls” would become “flat_screen_monitors.xls” when it is extracted from the Zip file)

    -yx Apply any extended time stamps found in the Zip file when extracting member files.

      wzunzip -yx c:\example.zip

    When extracting files from example.zip, set the files’ time stamps to the extended time stamps stored in the Zip file, if any.

    Only files that were zipped using the WZZIP extended time stamp option -yx will be stored with extended time stamps. See the WZZIP command reference for additional information.

    -yZ Security Zone identifier check on (NTFS drives and Outlook Express): WinZip® extracts the file from the Zip file with the same Zone Identifier as the Zip file.

      wzunzip restricted.zip risky.exe c:\output

    If restricted.zip has a Restricted Zone Identifier, risky.exe will be blocked from extracting to c:\output.

      wzunzip -yZ restricted.zip risky.exe c:\output

    Here risky.exe is allowed to extract, however it extracts with the same Zone Identifier as restricted.zip and may be blocked (by Windows) from executing.

    Related option -yz Security Zone identifier check off (NTFS drives and Outlook Express): WinZip extracts the file without any zone information. Use this setting if you trust the Zip file and its originating source.

      wzunzip -yz restricted.zip risky.exe c:\output

    This example allows risky.exe to be extracted with no Zone information and is allowed (by Windows) to execute.

    Related option -$ Restore volume label, if the Zip file contains a volume label, and if the target is a removable disk.

      wzunzip -$ -d c:\reports\q2inventory.zip c:\2007\q2\q2inventory

    Extract all files from q2inventory.zip to c:\2007\q2\q2inventory and preserve the folder structure contained in the Zip file. If you are unzipping to a removable disk and the Zip file contains a label, give the removable disk the same label that is contained within the Zip file, q2inventory.zip.

    Related option [email protected] Create a file listing all the files that would be unzipped 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 WZUNZIP command.

      wzunzip [email protected]:\report.txt Q2.zip c:\Q2expenses\*.*

    Create a text file, c:\report.txt, that contains a list of the files found in Q2.zip that would be extracted to c:\Q2expenses.

      wzunzip @c:\report.txt Q2.zip c:\Q2expenses\*.*

    Extract only those files from Q2.zip that are listed in the text file, c:\report.txt. The selective list of files will be extracted to the folder c:\Q2expenses.

    Related options -^^ Display the WZUNZIP command line on your screen.Note: the -^ switch can be specified with quotation marks “-^” if you prefer.

      wzunzip -^^ -Pr d:\temp\test.zip d:\level1\*.*

    This command will display the command line statement used to extract files from the Zip file, test.zip, after the WinZip Command Line Support Add-On program information is displayed and prior to the start of the list of files being extracted.

     

You must be logged in to reply to this topic.