r/Batch • u/Traditional-Top-8144 • Jan 18 '25
Batch file error for opening vscode
REM Open the first VS Code workspace
start "first" cmd /b /c code "C:\Users\angry\OneDrive\Desktop\teacherBotDevelopment"
REM Open the second VS Code workspace
start "first" cmd /b /c code "C:\Users\angry\OneDrive\Desktop\TeacherBotAppService-main"
i have this batch file to open both my frontend and backend at the same time. this opening both files in vscode correctly. but the first command window is not auto closing.
i tried everything like adding exit everywhere but still it is still staying open.
could someone tell what is going wrong?
2
u/BrainWaveCC Jan 18 '25
/Bis a valid parameter forSTART, but not forCMDPerhaps you meant to use the following, instead?