techphets August 25, 2009 at 05:51:34 Specs: Windows XP
I have one batch file calling a second. In the second file there is a FOR loop. I exit the FOR loop with a goto :EOF command but this seems to end both batch files. How can I end only the second batch file (the one with the for loop in it)?
Could it be that you forgot to use the CALL command in the first batch file? If you just "run" the second batch file from the first, you transfer control to the second batch file (like a goto) rather than calling it.
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.