I've have a program to send mails (command line)
I want to use it - in a batch file - with exec, but i can't to get
the output/error, just the batch command line itself. According
Windows documentation i can use "2>&1" to capture stdout and stderr,
so i try something like
set argumentos [list $file "> $res" "2>&1"]
exec mandamail.bat {*}$argumentos
El sábado, 22 de octubre de 2022 a la(s) 10:00:35 UTC-3, Rich escribió:
I started with the simplest, passing the program and its arguments to
the exec.
However, I was getting an error as if argument string was truncated
(does exec have any length restrictions?).
This is not a program problem because when run as a batch it works ok.
So I tried using exec with the batch file.
But if I redirect the output of the batch file using the exec options
@1) what I get is the command line that is executed within thebatch, not the output of the program.
That's why I thought I'd send the windows option as a parameter.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 428 |
Nodes: | 16 (2 / 14) |
Uptime: | 108:50:57 |
Calls: | 9,053 |
Files: | 13,395 |
Messages: | 6,015,910 |