# How to disable the output of 7-Zip?

I use 7-Zip to compress files inside a batch file like this:

...\right_path\7z a output_file_name.zip file_to_be_compressed


I got the following output:

7-Zip 4.65  Copyright (c) 1999-2009 Igor Pavlov  2009-02-03
Scanning

Creating archive output_file_name.zip

Compressing  file_to_be_compressed

Everything is Ok


Is it possible to disable this output (that is, I don't want anything to be printed)?

-

Just add > NUL: to the end of your command.

-
Great, thanks !! –  Misha Moroshko Oct 1 '10 at 4:41
...\right_path\7z a output_file_name.zip file_to_be_compressed | findstr /b /r /c:"\<Everything is Ok" /c:"\<Scanning" /c:"\<Creating archive"

Thanks for the findstr solution! It looks like you can somewhat shorten that call by either omitting /b or both the \r and the \< inside the search strings. I'd go with findstr /b /c:"Everything is Ok" /c:"Scanning" /c:"Creating archive" since you don't need regular expressions (the /r option) here - /b already searches only at the beginning of strings. –  Oliver Feb 23 at 9:43