I'm trying to make a batch file that opens a virtual enviroment inside vscode. So far the code looks like this :
if NOT exist ./env (
pip3 install virtualenv
virtualenv env
)
.\env\Scripts\activate.ps1
The if statement works as expected but the command after that does not. However when I run the program in the default terminal for windows, it works as expected.
Edit: I know this is probably not the best way to write the program but I'm new to batch and it works so I'm happy with it for now.
Edit 2: Let me try to better explain what the problem is. I when I run the program in a normal terminal it works just fine. The problem is that I use the terminal in vscode. If I try to just run a normal command in the terminal it says the command was not found (typing the name of the file). When I use the code runner extension it runs the first lines correctly but does not activate the virtual environment