Menu

Adding multiple files via stdin

2006-06-07
2012-12-08
  • Nobody/Anonymous

    I wonder: Is it possible to add multiple files when using -si switch? What I would like to do is to create a 7Z archive with e.g. five files, but without the need to create a temporary directory, store all the files there, compress them the "normal" way (7z a archive c:\temp\*.*) and delete the temporary directory.

    The only way I found requires multiple calls to 7z (7z a -sireadme.txt archive.7z && 7z a -siapplication.exe archive.7z), which means 1) the overhead of running the EXE, and 2) solid archive is not feasible.

    I would imagine that expanding the -si syntax to something like -si{filename}:{size},{filename2}:{size}... would be the best solution. Any chance of implementing something like this? Thanks.

     
    • Igor Pavlov

      Igor Pavlov - 2006-06-07

      Why do you need such feature?

      - Any chance of implementing something like this?

      You can change sourc code.

       
    • Nobody/Anonymous

      I guess I won't be needing this feature after all, simply because I am unable to find a way to send anything to 7-zip's standard input from my application.

      But the original idea was that I need to compress a few files but I don't want to store them in a temporary location (these files are rather critical so I would prefer if they didn't appear anywhere except in a compressed and encrypted form).

       
    • Nobody/Anonymous

      Why don't you simply add them like this:

      7za a archive.7z {file1} {file2} ... {fileN}

      By the way: Is there a limit of files that can be given via command line?

       
    • Nobody/Anonymous

      Because if I did that, those files would have to exist in the filesystem - and that's precisely what I want to avoid.

       
    • Nobody/Anonymous

      If you can create a RAMdisk and mount it as a drive then the problem is solved: put the temporary files in the ramdisk, compress them and destroy the ramdisk.

       

Log in to post a comment.

MongoDB Logo MongoDB