Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Zip a single file using winzip  (Read 12051 times)

0 Members and 2 Guests are viewing this topic.

daillest319

    Topic Starter


    Beginner

    • Experience: Beginner
    • OS: Unknown
    Zip a single file using winzip
    « on: April 03, 2012, 12:54:52 PM »
    For some reason i can not figure out how to jsut grab one file zip it. This command line grabs everything in the folder and zips it. am i missing something... I just want to grab the a single .jpg file and zip it?

    The file is i want to zip is called 15.jpg
    I also wanted to move the zip file to another directory listed underneath...
    C:\Documents and Settings\user1\My Pictures"

    which i think the -m does but I'm not sure how to add it as well can someone help?

    Code: [Select]

    "C:\Program Files\WinZip\WINZIP32.EXE" -a "C:\Documents and Settings\user1\My Documents\New Folder\15.zip"


    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Zip a single file using winzip
    « Reply #1 on: April 03, 2012, 01:03:46 PM »
    First of all .you can not use WinZip in DOS. It is a Windows program
    PKZIP is free and runs in DOS.
    http://pkzip.en.softonic.com/
    Sorry, that is the wrong version...
    Here is the DOS version.
    http://www.pkware.com/software/pkzip/dos
    « Last Edit: April 03, 2012, 01:20:09 PM by Geek-9pm »

    Salmon Trout

    • Guest
    Re: Zip a single file using winzip
    « Reply #2 on: April 03, 2012, 01:13:03 PM »
    Geek, if daillest39 is able to run a program from C:\Program Files, then clearly they are talking about Windows command prompy and not "DOS".

    WinZip supports command line options to add and extract from files.

    When adding files the command format is:

    [Path to]\winzip32.exe [-min] action [options] filename[.zip] files

    where:

    -min specifies that WinZip should run minimized. If -min is specified, it must be the first command line parameter.

    action
    -a for add, -f for freshen, -u for update, and -m for move. You must specify one (and only one) of these actions. The actions correspond to the actions described in the section titled "Add dialog box options" in the online manual.

    options
    -r corresponds to the Include subfolders checkbox in the Add dialog and causes WinZip to add files from subfolders. Folder information is stored for files added from subfolders. If you add -p, WinZip will store folder information for all files added, not just for files from subfolders; the folder information will begin with the folder specified on the command line.

    -ex, -en, -ef, -es, and -e0 determine the compression method: eXtra, Normal, Fast, Super fast, and no compression. The default is "Normal". -hs includes hidden and system files. Use -sPassword to specify a case-sensitive password. The password can be enclosed in quotes, for example, -s"Secret Password".

    filename.zip
    Specifies the name of the Zip file involved. Be sure to use the full filename (including the folder).

    files
    Is a list of one or more files, or the @ character followed by the filename containing a list of files to add, one filename per line. Wildcards (e.g. *.bak) are allowed.

    So,

    In your situation this would be the command line:

    "C:\Program Files\WinZip\WINZIP32.EXE" -a  "C:\Documents and Settings\user1\My Documents\New Folder\15.zip" "15.jpg"

    If you want to then move the zip file to another folder, why don't you just specify that folder as the zip file destination?



    daillest319

      Topic Starter


      Beginner

      • Experience: Beginner
      • OS: Unknown
      Re: Zip a single file using winzip
      « Reply #3 on: April 03, 2012, 01:20:53 PM »
      @Salmon Trout

      It worked perfect thank you  :)

      Salmon Trout

      • Guest
      Re: Zip a single file using winzip
      « Reply #4 on: April 03, 2012, 01:23:29 PM »
      @Salmon Trout

      It worked perfect thank you  :)

      All I did was type "winzip32.exe command line" into Google.

      Squashman



        Specialist
      • Thanked: 134
      • Experience: Experienced
      • OS: Other
      Re: Zip a single file using winzip
      « Reply #5 on: April 03, 2012, 03:22:02 PM »
      I have always just used the command line add on client.
       http://www.winzip.com/downcl.htm
      Most of our automated batch files use this where I work.