Jump to content

Recommended Posts

Posted

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.bat
PAUSE
Call 3.bat
PAUSE
CALL 4.bat
PAUSE

 

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>PAUSE
Press 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>PAUSE
Press 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>PAUSE
Press 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


Posted

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 you

It 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.

Posted (edited)

The full path of the current batch file is stored in %0, and %0\.. will remove the filename, so...

> Call 2.bat

Call %0\..\2.bat

Edited by jumper

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...