I am trying to build some sort of API made of batch files. Each of them needs to be able to output one or more parameters. These batch files will be called from a "main" batch file. What I am doing is more complex than this example, but to illustrate:
GetFamilyMembersByName.bat: returns a list of family members according to a name given as an input parameter.
GetWeightByName.bat: returns the weight according to a name given as an input parameter
GetPersonInfo.bat: Calls GetFamilyMembersByName.bat, GetWeightByName.bat and outputs all person information.
The question is:
How do I make a batch file return one or more parameters?
I have read about using Exit /B <value> to store on the errorlevel, but this is not an option, as it allows only one value and it must be a number.
I don't mind if the output is a single string with several parameters separated with spaces or tabs that can be parsed afterwards.
I have googled for a solution of this but I couldn't find an answer.
Thanks in advance!