I want to create a utility batch file which will be consumed by client batch file. The Utility batch file will create the result & will redirect as output. The client batch file will call utility.bat & will get the result in a variable.
The code of Utility.bat I have written is as below
echo off
set result="some info"
echo %result%
rem output
I am not sure about the syntax of how to pass the result as output
The code of client.batch is as below
@echo off
set var1=%Utility.bat%
echo "%var1%"
Need help in syntax to pass result as output.
I found many answers on web for passing result to text file (logging) but that was not my requirement.