sam240 Posted February 22, 2016 Share Posted February 22, 2016 Hello,This may be very simple but for some reason it's not working for me so I thought I come here for help.I'm running windows 7 64-bit and all I would like to do is run 3 batch scripts which install a software. I have 4 batch files named, 1.bat, 2.bat, 3.bat, 4.bat I use bat 1 to run the other 3 batch files which install programs as some suggested to use CALL method but it does not work on windows 7. 1.bat currently reads (PAUSE is so I can read the errors) Call 2.batPAUSECall 3.batPAUSECALL 4.batPAUSE When I run 1.bat, I get the following errors C:\Windows>Call 2.bat'2.bat' is not recognized as an internal or external command,operable program or batch file.C:\Windows>PAUSEPress any key to continue . . .C:\Windows>Call 3.bat'3.bat' is not recognized as an internal or external command,operable program or batch file.C:\Windows>PAUSEPress any key to continue . . .C:\Windows>CALL 4.bat'4.bat' is not recognized as an internal or external command,operable program or batch file.C:\Windows>PAUSEPress any key to continue . . . what command can I use to execute these batch files probably one at a time. Any help will be appreciated. Thank you Link to comment Share on other sites More sharing options...
Glenn9999 Posted February 22, 2016 Share Posted February 22, 2016 C:\Windows>Call 2.bat'2.bat' is not recognized as an internal or external command,operable program or batch file. what command can I use to execute these batch files probably one at a time. Any help will be appreciated. Thank youIt would help if you debugged your batch files properly. The answer is pretty patently obvious here - 1.bat is simply not finding the others, probably because the current directory is different than the one the batch files reside in. Link to comment Share on other sites More sharing options...
jumper Posted February 22, 2016 Share Posted February 22, 2016 (edited) The full path of the current batch file is stored in %0, and %0\.. will remove the filename, so...> Call 2.batCall %0\..\2.bat Edited February 22, 2016 by jumper Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now