5

I will be running 7Zip from node.js as a command line batch job. Is there a way to track the progress, (i.e. to read the progress meter (20% OF 100%) either by reading the output stream, or any other way so that I can forward this to a user.

Thanks

1 Answer 1

5

I have found one can get incremental progress from the command line (no GUI). Try the -bsp1 switch: https://sevenzip.osdn.jp/chm/cmdline/switches/bs.htm

However, a better way to create and track a zip archive creation is probably to use a npm package called archiver (https://github.com/archiverjs/node-archiver/issues/147) which does not need to do context switching, or reading of the output stream, to track, and my testing shows it runs at the same or better speed than 7zip.

3
  • Please do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by voting to close it as a duplicate or, if you don't have enough reputation for that, raise a flag to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places.
    – DavidPostill
    May 29, 2017 at 17:13
  • the other question was how to track the progress of the extract, this question was mine how to track the progress of the zip create
    – Dr.YSG
    May 29, 2017 at 17:16
  • That doesn't matter. Different questions can have the same answer - and are therefore duplicates.
    – DavidPostill
    May 29, 2017 at 17:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .