Computing.Net > Forums > Programming > Batch file calls second, goto :EOF ends both?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch file calls second, goto :EOF ends both?

Reply to Message Icon

Name: techphets
Date: August 25, 2009 at 05:51:34 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

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)?

Thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: Piet
Date: August 25, 2009 at 07:55:08 Pacific
Reply:


How do you call your second batch file ?

if you just use:
b.bat
it will go wrong
you should use:
call b.bat

Hopes this helps


0

Response Number 2
Name: klint
Date: August 25, 2009 at 07:55:14 Pacific
Reply:

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.


0

Response Number 3
Name: klint
Date: August 25, 2009 at 07:57:07 Pacific
Reply:

Piet got there first with the same advice... just beat me by 6 seconds!


0

Response Number 4
Name: Piet
Date: August 25, 2009 at 08:01:06 Pacific
Reply:

sorry :-)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch file calls second, goto :EOF ends both?

Enviromental Variable with decimal www.computing.net/answers/programming/enviromental-variable-with-decimal/9990.html

Batch File Read Lines from .txt www.computing.net/answers/programming/batch-file-read-lines-from-txt/16834.html

Batch File Nested FOR variables www.computing.net/answers/programming/batch-file-nested-for-variables/15977.html