I created a batch file to open VS Code to a specific folder. Here is the code -
cd z:\files\development\xampp\code\htdocs\Acme1
code .
Note that Z: maps to an external SSD. The above works as expected.
Then I added more lines to try and open multiple instances of VS Code -
cd z:\files\development\xampp\code\htdocs\Acme1
code .
cd z:\files\development\xampp\code\htdocs\Acme2
code .
I expected this to open 2 separate instances of VS Code, one with the Acme1 folder open, the other with the Acme2 folder open. However, it only opens VS Code once, with the Acme1 folder open.
Per this answer, I modified my Windows 11 Path environment variable to include C:\Users\knot22\AppData\Local\Programs\Microsoft VS Code\bin
. Alas, this made no difference in the behavior of the batch file, even after restarting the machine.
What needs to be changed to get the batch file to open both instances of VS Code?