Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

7za.exe question

Michael
2010-12-02
2012-12-07
  • Michael
    Michael
    2010-12-02

    I need help using the 7 zip command line.

    I have a directory (let's say c:\a) that i want to compress and send out to let's say (c:\a1)  how would i go about doing this from the 7 zip command line?

    Thank you.

     
  • Vacon
    Vacon
    2010-12-02

    Hello everyone,

    be sure to have either 7z.exe with 7z.dll or 7za.exe in your path or in the directory you start your command from (here -> root of C:\ ):

    7z(a).exe a <destiny-folder>\<archive-name>.zip <source-folder>\<filename>
    

    In your case -> 7z.exe a a1\file.zip a\file.

    Best regards!

     
  • John Lee
    John Lee
    2010-12-02

    Try the well known RTFM technique, then, when you've tried a few things, if necessary ask qs on this forum about problems- the forum isn't here to do your job for you! J

     
  • Michael
    Michael
    2010-12-02

    Vacon,

    Thank you for help that worked!

     
  • Michael
    Michael
    2010-12-02

    Does this have a size limit?  I am trying to compress 18 GB of data.  I received the following error: Can't allocate required memory!

    This server has 16 GB of RAM and the virtual memory is max out at 4GB.

     
  • Vacon
    Vacon
    2010-12-02

    Hello everyone,

    how many files are in the directory you want to compress? And do you use additional commands or switches?

    Best regards!

     
  • Igor Pavlov
    Igor Pavlov
    2010-12-03

    How many CPU threads do you have in your server?

    64-bit version probably can fix problem.

     
  • Michael
    Michael
    2010-12-03

    the directory is 18 GB.

    What other switches would I use?
    Microsoft Windows
    Copyright (C) 2009 Microsoft Corporation.  All rights reserved.

    H:\&gt;c:

    C:\&gt;cd 7zip_cmd

    C:\7zip_cmd>7za.exe

    7-Zip (A) 9.20  Copyright (C) 1999-2010 Igor Pavlov  2010-11-18

    Usage: 7za <command>  <archive_name>
          

    <Commands>
      a: Add files to archive
      b: Benchmark
      d: Delete files from archive
      e: Extract files from archive (without using directory names)
      l: List contents of archive
      t: Test integrity of archive
      u: Update files to archive
      x: eXtract files with full paths
    <Switches>
      -ai[r]{@listfile|!wildcard}: Include archives
      -ax[r]{@listfile|!wildcard}: eXclude archives
      -bd: Disable percentage indicator
      -i[r]{@listfile|!wildcard}: Include filenames
      -m{Parameters}: set compression Method
      -o{Directory}: set Output directory
      -p{Password}: set Password
      -r: Recurse subdirectories
      -scs{UTF-8 | WIN | DOS}: set charset for list files
      -sfx: Create SFX archive
      -si: read data from stdin
      -slt: show technical information for l (List) command
      -so: write data to stdout
      -ssc: set sensitive case mode
      -ssw: compress shared files
      -t{Type}: Set type of archive
      -u: Update options
      -v{Size}: Create volumes
      -w: assign Work directory. Empty path means a temporary directory
      -x[r]]{@listfile|!wildcard}: eXclude filenames
      -y: assume Yes on all queries

    C:\7zip_cmd>

     
  • Michael
    Michael
    2010-12-03

    the only command i am using is the following:

    c:\7zip_cmd>7za.exe a c:\test\test.zip c:\testresults

     
  • tss
    tss
    2012-10-08

    I am trying to compress 1.5 GB of data but i am unable to do it. I am using Windows Server 2003 with 2.30 GHz processor and 1 GB of RAM.

     
  • Igor Pavlov
    Igor Pavlov
    2012-10-08

    1) what command do you try?
    2) what error message do you have?
    3) If it's RAM amount error,
    call the command
    7z b > a.txt
    and show a.txt here.

     
  • tss
    tss
    2012-10-08

    I am using Script to run 7za.exe. Here's the script:
    cscript warmzip.wsf /r "d:\logfiles\dgxw\" /f:.log /ca:2 /da:380 /log:d /cp:"d:\Compress\7za.exe" /cpp:"a -tgzip $out $in"
    echo compression done
    brc32.exe /DIR:"d:\Logfiles" /PATTERN:"*.zip" /RECURSIVE /FIXEDEXT:.gz /EXECUTE
    echo rename done

    I am not getting any error it just not compressing the files greater than 1.5 GB.

     
  • Igor Pavlov
    Igor Pavlov
    2012-10-08

    I don't know that script language.
    Try to simplify your script.
    At first try
    7za.exe -tgzip a.gz bigfile
    If it works, try slightly more complex script. If it works, try slightly more complex script again, and so on. And you will find the problem at some step.

     
  • tss
    tss
    2012-10-08

    Script works for files size less than 1.5GB so it should work for file size greater than 1.5 GB right because in script it hasn't mentioned anything about the file size.

     
  • Igor Pavlov
    Igor Pavlov
    2012-10-08

    Maybe filename is unusual (with spaces or something else).

     
  • tss
    tss
    2012-10-08

    If you look at the script it uses some "Warmzip" - cleanup tool. Does Warmzip has some sort of limit on compressing the files ?