tags:

views:

2023

answers:

3

Is there a 7-Zip command-line switch that prevents the filenames from echoing to the screen as they are added to the archive?

A: 

If it doesn't have one, you can still redirect the output using > into a file, then deleting the file afterwards. If you are on *nix, you can redirect into /dev/null.

Edit

In MS-DOS and cmd.exe you can redirect into NUL, instead of a file. Thanks to agnul for this hint.

freespace
On windows systems you can redirect to NUL (works in cmd.exe, doesn't in powershell).
agnul
Hey cool, didn't know that :)
freespace
+3  A: 

Not built in, but if you add

<7z command here> 2>&1 NUL

to the end of your command-line, it will redirect all the output into the null device and stops it echoing to the screen. This is the MS-DOS equivalent of

2>&1 /dev/null

in Linux and Unix systems.

workmad3
A: 

AFAIK, there is not a switch for that, but you could hide the output redirecting it to a file, for example (DOS batch):

7z.exe ... normal parameters > DumpFile.txt

This way all the output ends in DumpFile.txt and not on the screen.

Dario Solera