Batch Compression

Discussion in 'General Off-Topic Chat' started by .::5pYd3r::., Jul 31, 2007.

  1. .::5pYd3r::.

    .::5pYd3r::. Viva La Pizza

    Jun 2, 2007
    The GREAT Southern Land :D
    What is the best batch compression utility (.7z file compression compatibility if possible)
    all help much appreciated
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    Nov 21, 2005
    United Kingdom
    A bunch of individual files to seperate files?

    My personal preference would be for a batch file and the 7zip command line.
    Assuming all files in one directory open a command line window
    dir /b (if they are not all in one directory tack a /s on the end to browse a subdirectory and maybe a /p if it is going to run over).
    Right click, hit mark and select all you want.
    Paste into excel or some spreadsheet. Remember to wrap it in quotes if you have something like C:\program files\ (i.e. a space)

    The 7zip command line from the help. You may notice that this could do most of what you want but the command line is more powerful if done properly. This being said you could also play around with the list file support if you wanted.
    7z [...] [...]

    ::= | | |
    ::= []
    ::= '/' | '-'
    ::= @{filename}

    Basically you want, I suggest using the 7z version as the 7za version, while standalone, is a bit limited.
    7z a -t7z [location\compressed file name.7z] [location\input name]

    Insert this before the file names and fill downwards, I advise any spaces be filled with an odd character like # or @ so you can replace easily, copy and paste into notepad and replace tabs with nothing (they copy can paste if your editor does not like it) and the "odd characters" with space.
    Save with extension .bat and run it from the 7zip directory.
    You will end up with a batch file like this
    7z a -t7z "c:\a.7z" "c:\a.txt"
    7z a -t7z "c:\b.7z" "c:\b.txt"

    Not very glamourous I admit but it works. Play around a bit and you can do just about anything. if you add a -m on the end of the command you can set higher compression and stuff. I suggest reading the bundled help file though.
  3. .::5pYd3r::.

    .::5pYd3r::. Viva La Pizza

    Jun 2, 2007
    The GREAT Southern Land :D
    thanx alot [​IMG]