Batch Compression

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

Jul 31, 2007

Batch Compression by .::5pYd3r::. at 9:56 AM (669 Views / 0 Likes) 2 replies

  1. .::5pYd3r::.
    OP

    Member .::5pYd3r::. Viva La Pizza

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

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,738
    Country:
    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::.
    OP

    Member .::5pYd3r::. Viva La Pizza

    Joined:
    Jun 2, 2007
    Messages:
    766
    Location:
    The GREAT Southern Land :D
    Country:
    Australia
    thanx alot [​IMG]
     

Share This Page