Menu

Redirecting Messages from 7z Command Line

Help
2004-11-14
2012-12-07
  • Nobody/Anonymous

    When using 7-zip 3.13, I could redirect error messages to a file by using the ">".  Is there any way in the 4.xx betas to do this same functionality?  I have a script that compresses and uncompresses file groups and it is set to simply look for the "Everything is Ok" from the file containing the program's output.

     
    • Nobody/Anonymous

      Seems as if 7-zip is able use unix style redirection.

      So something like this will work:

      7za.exe a ARCHIVE -mx=9 -badparam 2>errorfile

      or if you were to combine it with the unix 'tee' command:

      7za.exe a ARCHIVE -mx=- -badparam 2>&1 | tee errorfile

      "n>&m: Swap Standard Output and Standard Error"
      http://www.unix.org.ua/orelly/unix/upt/ch45_21.htm

      (therube)

       

Log in to post a comment.