You are not logged in.

#1 10 Jun 2018 19:19

Zeek
New Member
Registered: 10 Jun 2018
Posts: 1

Return to caller with variable?

Is there any command that can keep the variables so that the file that called it can display them with the same name?

e.g:

File 1:
set a=foo
goto :eof

File 2:
Call File 1
echo %a%
pause

File 2 should still keep File 1's A variable.

Offline

#2 10 Jun 2018 23:41

Shadow Thief
Member
Registered: 12 Jul 2012
Posts: 205

Re: Return to caller with variable?

As long as you don't have setlocal in file 1, it will already do that.

lqRwOrq.png

Last edited by Shadow Thief (10 Jun 2018 23:47)

Offline

Board footer

Powered by