Zipping many files -- each file into its own zip file with same name

Discussion in 'Computer Support' started by k*, Jul 9, 2003.

  1. k*

    k* Guest

    One more question. I have 200 *.txt files in the same directory and I want
    to zip each of them into a *.zip file with the same name. Example:
    my dog.txt => my dog.zip
    old days.txt => old days.zip
    ....and so on...

    I have winzip and winrar but I can't figure out how to do this for all
    files at once. Command-line is ok.

    Thx,
    k*
     
    k*, Jul 9, 2003
    #1
    1. Advertisements

  2. k*

    °Mike° Guest

    °Mike°, Jul 9, 2003
    #2
    1. Advertisements

  3. k*

    JabberSmith Guest

    http://www.winzip.com/wzcline.htm - download the add-in for free.

    Found that address in the Help files. You should check em out some time. :)
     
    JabberSmith, Jul 9, 2003
    #3
  4. k*

    k* Guest

    I already have that add-on, but I still can't figure out how to do it (I
    know how to run wzzip and wzunzip for single files, but I can't figure out
    how to use it for my purpose..) Can you tell me how? I tried "wzzip *.zip
    *.txt", but that doesn't work...

    Thanks,
    k*
     
    k*, Jul 9, 2003
    #4
  5. k*

    °Mike° Guest

    Open a DOS box in the directory of your text files and type:

    dir /a-d /b >c:\windows\desktop\list.txt

    This will give you a list of the files in your folder, that
    you can use in a batch file. You will probably want to get
    a decent text editor with good replace functions:
    http://www.ultraedit.com

    Alternatively, ask in
     
    °Mike°, Jul 9, 2003
    #5
  6. k*

    Jj Guest

    use winrar - it does zips too

    install it, start it.
    navigate to the directory with the files in
    select all the files
    click add
    change from rar to zip
    change compression method to best
    click the files tab
    select "put each file into seperate archive"
    click ok
     
    Jj, Jul 9, 2003
    #6
  7. k*

    Brian H¹© Guest

    X-No-Archive: Yes
    In a desperate cry for help Jj said:
    But the OP wants to create seperate zip files for each file it finds, in a
    single operation.
     
    Brian H¹©, Jul 9, 2003
    #7
  8. k*

    Jj Guest

    like this:

    c:\folder\a.txt
    c:\folder\b.txt
    c:\fodler\c.txt
    becomes
    c:\folder\a.zip
    c:\folder\b.zip
    c:\folder\c.zip
    in a single operation. Isn't that what is wanted?

    better instructions:

    1) start winrar
    2) in winrar select all the files you want to zip
    3) click the add button at the top
    4) change the "archive format" setting in the new window from "rar" to "zip"
    5) click the files tab, click "put each file into seperate archive"
    6) click ok

    Maybe it only works with the registered version, works here anyway.
     
    Jj, Jul 9, 2003
    #8
  9. k*

    Ben Guest

    Go to http://www.ultimatezip.com/ and download ultimate zip for free.
    Then use the Batch Compressor in the Tools menu. Just keep adding files
    until you are done.
     
    Ben, Jul 10, 2003
    #9
  10. k*

    k* Guest

    Jj,

    Yes, that's exactly what I wanted. Thanks a lot..works great! :)

    k*
     
    k*, Jul 10, 2003
    #10
  11. k*

    Josef Knecht Guest

    Have you lost the ability to read, Brain? That's exactly what has
    been offered.

    --
    zar 2k3 - ULC Reverend
    Certified Word Police Officer - Details Detail
    http://www.geocities.com/spamresources/spambots.htm
    http://www.drcnet.org/ http://www.abovegod.com/
    NuMbEr Tr3#3!!!!11! on a lits...

    "A man, a plan, a canoe, pasta, heros, rajahs,
    a coloratura, maps, snipe, percale, macaroni,
    a gag, a banana bag, a tan, a tag, a banana bag
    again (or a camel), a crepe, pins, Spam, a rut,
    a Rolo, cash, a jar, sore hats, a peon, a canal
    - Panama!"

    - Guy Steele Jr., CLTL2
     
    Josef Knecht, Jul 14, 2003
    #11
  12. k*

    Brian H¹© Guest

    X-No-Archive: Yes
    Josef Knecht said:
    How far behind the rest of the world are you at the moment, 1 week?
    Catch up, and stop trolling me, or have you nothing better to do? Because you
    certainly aren't helping answer peoples problems.
     
    Brian H¹©, Jul 14, 2003
    #12
  13. X-No-Archive: Yes

    In Brian H¹© <> typed
    || X-No-Archive: Yes
    || Josef Knecht said:
    ||
    |||
    |||| X-No-Archive: Yes
    |||| In a desperate cry for help Jj said:
    ||||
    ||||| |||||
    |||||| One more question. I have 200 *.txt files in the same directory
    |||||| and I want to zip each of them into a *.zip file with the same
    |||||| name.
    |||||| Example: my dog.txt => my dog.zip
    |||||| old days.txt => old days.zip
    |||||| ...and so on...
    ||||||
    |||||| I have winzip and winrar but I can't figure out how to do this
    |||||| for all files at once. Command-line is ok.
    ||||||
    |||||| Thx,
    |||||| k*
    |||||
    ||||| use winrar - it does zips too
    |||||
    ||||| install it, start it.
    ||||| navigate to the directory with the files in
    ||||| select all the files
    ||||| click add
    ||||| change from rar to zip
    ||||| change compression method to best
    ||||| click the files tab
    ||||| select "put each file into seperate archive"
    ||||| click ok
    ||||
    |||| But the OP wants to create seperate zip files for each file it
    |||| finds, in a single operation.
    |||
    ||| Have you lost the ability to read, Brain? That's exactly what has
    ||| been offered.
    ||
    || How far behind the rest of the world are you at the moment, 1 week?
    || Catch up, and stop trolling me, or have you nothing better to do?

    Everyone's a troll...
    Everyone's a stalker...
    .... except *you*
     
    Robert de Brus, Jul 14, 2003
    #13
  14. k*

    JR Guest

    Probably a bit late but in the bad old DOS days I used mzip.bat
    "I made it myself":

    @echo off
    if "%1"=="" goto Usage
    if "%1"=="*" goto Usage
    if "%1"=="*." goto Skip

    if exist *. ren *. *.#$&
    echo.
    echo Creating *. from *.%1 ...
    echo.> TEMP.!#$

    ren *.%1 *.
    for %%a in (*. ) do copy TEMP.!#$ %%a.TMP > nul
    ren *. *.%1
    ren *.TMP *.

    del TEMP.!#$
    echo Completed.
    echo.

    for %%f in (*. ) do pkzip %%f %%f.%1
    echo.
    echo Cleaning up ...
    del *.
    if exist *.#$& ren *.#$& *.
    echo Completed.
    echo.
    goto End

    :Usage
    echo.
    echo Usage: %0 [file extension]
    echo where [file extension] = TXT BMP etc. (but NOT * )
    echo or *. if desired files have no extension.
    echo.
    echo Purpose: Creates individual ZIPs of each file of a specified
    echo extension in the current directory, using the names of the files
    echo as the ZIP names.
    echo.
    goto End

    :Skip
    for %%f in (*. ) do pkzip %%f %%f.
    echo.

    :End
     
    JR, Jul 15, 2003
    #14
  15. X-No-Archive: Yes

    |||||
    ||||| How far behind the rest of the world are you at the moment, 1
    ||||| week? Catch up, and stop trolling me, or have you nothing better
    ||||| to do?
    |||
    ||| Everyone's a troll...
    ||| Everyone's a stalker...
    ||| ... except *you*
    |||
    ||
    || Brain's not a troll - he's a 'respected reg'...

    he's a wanker
    he's never had respect in his life... nor will he ever
     
    Robert de Brus, Jul 15, 2003
    #15
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.