Menu

#139 zipping files individually in the same directory from comman

open
nobody
None
5
2012-12-07
2006-12-21
rjohnson53
No

IF I have multiple files in a directory and I want them toi be zipped independently is ther a switch that can be used to do that in a single command line?
In other words if I had file1.txt, file2.txt, file3.txt I would want the output to be file1.zip, file2.zip and file3.zip.
If there is a way that someone has discovered please let me know.

Discussion

  • Wermlandsdata, Bernhard

    Logged In: YES
    user_id=1314384
    Originator: NO

    Use for

    Such as
    for %d in (file*.txt) do 7z.exe a %d.zip %d

    Add an extra % for each %d if you plan to use it in a BATch file.

     
  • Nobody/Anonymous

    Logged In: NO

    I'm also interessted in that feature

     
  • Michael Steiger

    Michael Steiger - 2007-08-28

    Logged In: YES
    user_id=592205
    Originator: NO

    will this feature be worth for a feature request?

     
  • rjohnson53

    rjohnson53 - 2007-08-28

    Logged In: YES
    user_id=1674378
    Originator: YES

    I know a loop can be used, as I did, I just thought it would be handy to do it in one line rather than a loop. Hopefully a bit quicker than looping, but who knows. Good suggestion though.

     

Log in to post a comment.

MongoDB Logo MongoDB