So, dtech10 provided a way to get your 3rd party application's outputs together in one line.
That would also be a way out, but the script would still depend on the 3rd party app now.exe, and with dtech10's suggestion, even another app is required.
Eso21, if you wish to make the process using that 3rd party app (now.exe) because it makes the source code simpler, I can provide a simple way of doing it but without needing one another app. Here we go:
@echo off
:: ASCII assembler by Laura Fairhead
echo XPYP[*'CC-\1P\QX,=P,APZ5O!PQ2O~5aaI~}Ksx> %temp%.\T1.COM
%temp%.\T1.COM SET D1=> %temp%.\T2.BAT
now.exe >> %temp%.\T2.BAT
:: Copy process goes here
%temp%.\T1.COM SET D2=>> %temp%.\T2.BAT
now.exe >> %temp%.\T2.BAT
call %temp%.\T2.BAT
echo %D1% DOS.TXT %D2%>> C:\File.log
for %%? in (1 2) do set D%%?=
for %%? in (T1.COM T2.BAT) do del %temp%.\%%?
The assembler program placed on the file T1.COM works just like the ECHO command, but it won't output a final CR/LF character. Look at the difference:
echo SET VAR=> temp.bat
now.exe>> temp.bat
The file temp.bat gets this:
SET VAR=
02/23/2003 14:00:00
Now, if we use the assembler program instead of the ECHO cmd, we get:
%temp%.\T1.COM SET VAR=> temp.bat
now.exe >> temp.bat
The file temp.bat gets this, instead:
SET VAR=02/23/2003 14:00:00
And then we can CALL the file temp.bat, sending the output from now.exe to a variable, to be used later.
Got the idea? But the good part is that T1.COM is created, used and deleted by the batch script, which means it's not a required application.
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br
________________________________________________________________