Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
flywire
- Posts: 17
- Joined: 14 Feb 2018 03:10
#16
Post
by flywire » 04 Jun 2018 16:36
This is a better test environment.
Program runs with one set of input files, it just does the same calculation. Stub1 uses the newly compiled test program.
stub.bat
Code: Select all
@echo off
for /l %%a in (1, 1, 5) do Program
Screen
Code: Select all
E:\bat\NestBat>stub> stub.log
E:\bat\NestBat>stub1> stub1.log
E:\bat\NestBat>
stub.log
Code: Select all
[program output]
[program output]
[program output]
[program output]
[program output]
-
Squashman
- Expert
- Posts: 4486
- Joined: 23 Dec 2011 13:59
#17
Post
by Squashman » 04 Jun 2018 20:45
That is your program either writing to stderr or to the console.
-
flywire
- Posts: 17
- Joined: 14 Feb 2018 03:10
#18
Post
by flywire » 05 Jun 2018 04:06
Squashman wrote: ↑04 Jun 2018 20:45
That is your program either writing to stderr or to the console.
Code: Select all
E:\bat\NestBat>type stub2.bat
@for /l %%a in (1, 1, 3) do Program
E:\bat\NestBat>stub2 1>stub2.log
E:\bat\NestBat>stub2 1>stub2.log 2>nul
E:\bat\NestBat>
Getting there but this is too complex for a user so the redirect needs to go into the batch file.
Was suggested previously but maybe I missed it. There are a lot lines with many leading and trailing blank lines in the real
[program output].
pieh-ejdsch wrote: ↑02 Jun 2018 12:05
This prog.exe will print all these empty lines to your command line. It means the standard output isn't into handle1. Test the handle number for this output.
Code: Select all
Prog.exe 2>nul
Prog.exe 3>nul
...
Prog.exe 9>nul
dummkopf
Code: Select all
E:\bat\NestBat>type stub2.bat
@for /l %%a in (1, 1, 3) do Program 2>nul
E:\bat\NestBat>stub2 >stub2.log
E:\bat\NestBat>
It looks like I'll have to run it with the warning gauges disconnected!
My sincere thanks for help from forum members, especially sst. The simplified repetitive test environment developed under your guidance helped me understand the issue with a program developed in the 1980's or earlier on another system.