troubleshooting Question

Return result to caller batch file

Avatar of deepak singla
deepak singla asked on
Windows Batch
2 Comments1 Solution110 ViewsLast Modified:
I have two batch files A.bat and B.bat. A.bat is calling to B.bat.
B.bat is doing some processing, and return back the result to A.bat. How A.bat can accept the return?

A.bat
@echo off
set str1=1,2,3,4,5
set str2=6,7,8,9
call B.bat %str1% %str2%

B.bat
@echo off
set str1=%1
set str2=%2
set str3=%str1%,%str2%

Expected that B.bat return %str3% (means 1,2,3,4,5,6,7,8,9) back to A.bat file So that A.bat used the result for further processing.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros