• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Windows 7 Question

 
Ranch Hand
Posts: 246
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is obviously not the forum for this question, since this forum is about how Linux or UNIX relate to Java, but I don't see a forum dedicated to Windows 7. Does anyone know of a discussion forum for Windows 7 machines?

My question in particular has to do with three batch files, "Both.bat" that consists of:

"First.bat" that consists of:

and "Second.bat" that consists of:

When I execute "Both.bat", I find that it executes "First.bat" but never returns to execute "Second.bat". Does anybody know a way to get around that, to get a batch file to execute another batch file but then return to the first batch file when the second one finishes?
 
Sheriff
Posts: 5555
326
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're right, we don't have a dedicated forum for Windows 7. We have Linux/UNIX because the majority of Java Enterprise applications are deployed on some flavour of UNIX, such as RedHat and Solaris. We don't get enough Windows specific questions to warrant its own fourm, so the General Computing forum will suffice. I've moved your questions over there so you're more likely to get a reply.
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if you reverse the two in both.bat, what does it print? what if you just have second in it?
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kevin Simonson wrote:When I execute "Both.bat", I find that it executes "First.bat" but never returns to execute "Second.bat".



This behavior is an artifact from the old DOS days. When one batch file invokes another, control is given to the second file. It does not return. If you want to return to the first batch file, you need to use the CALL command.
 
Kevin Simonson
Ranch Hand
Posts: 246
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

fred rosenberger wrote:if you reverse the two in both.bat, what does it print? what if you just have second in it?



If I reverse the order, it just prints "Second"; if I just have Second in it, it still just prints "Second".
 
Kevin Simonson
Ranch Hand
Posts: 246
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Ess wrote:

Kevin Simonson wrote:When I execute "Both.bat", I find that it executes "First.bat" but never returns to execute "Second.bat".


This behavior is an artifact from the old DOS days. When one batch file invokes another, control is given to the second file. It does not return. If you want to return to the first batch file, you need to use the CALL command.


This fixed my problem. Thanks!
reply
    Bookmark Topic Watch Topic
  • New Topic