Made it to work. It doesn't have nothing to do with redirection but the way the batch file is launched. Using the ShellExecute with no operation, the batch file name as program to execute, and the following form, I get all what I need: @echo off if exist c:\tmp\bd.log del c:\tmp\bd.log c:\tmp\bd.log ( if exist c:\tmp\bb.log del c:\tmp\bb.log c: cd C:\Backups\Backups-20190220_1105 if exist C:\Backups\Backups-20190220_1105\AFOR.7z del C:\Backups\Backups-20190220_1105\AFOR.7z C:\Firebird\Firebird_2_5\bin\gbak.exe...
Hi Folks. I'm experiencing some trouble when using 7za.exe (x86_64) in a batch (.cmd) file in Win10. Redirecting the output writes anything. Example, lanching a CMD file where one of the commands is: C:\7z-x64\x64\7za.exe a -t7z -mx7 -bso1 -bse1 -r -bb2 c:\Backups\Backups-20190220_1105\courant.7z c:\Backups\Backups-20190220_1105\courant.fbk >c:\tmp\bk7z.log 2>&1 writes just nothing in c:\tmp\bk7z.log which is always empty. On another hand, executing only the 7za command in a command line window runs...