So I have a large number of services I'm running locally for my application, and I need a nice convenient way to first install all of their dependencies without going into the individual folders in one terminal, and second keep them up to date easier. I'm using node/npm and its not working. Here is an example of how it looks
start cd ./Service1 && npm install
start cd ./Service2 && npm install
start cd ./Service3 && npm install
and it keeps going and going. When I run the bat file, it will open a cmd prompt for each one as it should, and it changes directories just fine, but it switches back to the directory all of the services are housed in and then runs npm install. At least from what I can tell, that is what's happening. How can I change to Service1 and run npm install in it's own cmd prompt, then open another cmd prompt and do the same thing and so on?
In your code the START command starts a separate process and does a change directory. That process is its own separate environment and then closes that environment.
I think what you are attempting to do is see if the folder exists and if it does then run npm install.
So a better option would be.
IF EXIST "Service1" START "" /D Service1 call npm install