How to Suppress 7-Zip Command Line Output
This guide explains how to suppress progress indicators and standard output when running 7-Zip from the command line. Automating compression or extraction tasks in batch scripts, CI/CD pipelines, or background processes often requires silencing console output to reduce log clutter or enhance script performance. You will learn how to use native 7-Zip switches to silence progress bars, hide standard information, and handle full execution silencing.
Suppress Only Progress
Indicators: -bsp0
7-Zip provides the -bsp switch to control the progress
stream. By default, 7-Zip writes its dynamic percentage and progress bar
to standard output. Appending -bsp0 disables the progress
display while preserving the command summary and error messages.
7z a archive.zip C:\path\to\files -bsp0This is ideal when you want to keep final execution logs clean without losing standard informational feedback.
Achieve
Completely Quiet Execution: -bso0 -bsp0
To completely silence successful console output, combine
-bsp0 (disable progress stream) with -bso0
(disable standard output stream). With this configuration, 7-Zip outputs
nothing unless an error occurs, as standard error (-bse)
remains active.
7z a archive.zip C:\path\to\files -bso0 -bsp0Extraction Example:
7z x archive.zip -o"C:\output\folder" -bso0 -bsp0 -y(Note: -y assumes "yes" on all overwrite queries,
preventing prompts that could halt silent execution).
Stream Control Switch Reference
7-Zip manages streams through dedicated switches followed by a mode
number (0 = disable, 1 = standard output,
2 = standard error):
-bsp0: Disables the progress stream.-bso0: Disables the standard information/status stream.-bse0: Disables the standard error stream.
Alternative: Operating System Redirection
If using an older version of 7-Zip that lacks -bsp
support, redirect the output using shell operators.
Windows (CMD / Batch)
Redirect stdout to nul while keeping errors visible:
7z a archive.zip C:\path\to\files > nulTo suppress both output and errors entirely:
7z a archive.zip C:\path\to\files > nul 2>&1Linux / macOS (Bash)
Redirect standard output to /dev/null:
7z a archive.zip /path/to/files > /dev/null