Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Re-direct output from Gosub

Aug
1,916
68
I was not aware that one could re-direct output from Gosub, but apparently it can be done;
Code:
@setlocal
@echo off
gosub :writefile >output.txt
type output.txt
del /q output.txt
endlocal
quit

:writefile
echo _4ver   : %_4ver
echo _x64    : %_x64
echo _isodate: %_isodate
return

Posting mainly for my future reference, but others may also be interested.

Joe
 
Back
Top