Visual Studio Code terminal error: The filename, directory name, or volume label syntax is incorrect

3.8k Views Asked by At

I have this issue in microsoft visual studio code, whenever I open the terminal the first message I get is The filename, directory name, or volume label syntax is incorrect. The terminal works fine.. just it bugs me to see see this error message whenever I open the terminal.. how do I fix it?

I Installed Cmder as my default visual studio code terminal, maybe there is something related to this error?

thanks in advance

enter image description here

2

There are 2 best solutions below

0
On

I got the same problum but it got fixed by following this steps

  1. go to setting and search json

  2. click on launch -(Edit in setting.json)

  3. now replace the line "terminal.integrated.shell.windows":(path as showing) line to

    "terminal.integrated.shell.windows": "C:\Windows\System32\cmd.exe", "terminal.integrated.shellArgs.windows": [ "/k", "C:\cmder\vendor\init.bat"],

  4. save the program. Done!

0
On

I am not sure how you have installed cmder as the integrated terminal in vscode but in settings.json you could try pointing the terminal.integrated.shell.windows to cmd.exe and the terminal.integrated.shellArgs.windows to what makes cmd.exe be (act like) cmder which is cmder's init.bat file. So in your vscode settings.json add or modify the below lines to point to your cmd.exe and cmder init.bat respectivley.

    "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
    "terminal.integrated.shellArgs.windows": [ "/k", "C:\\cmder\\vendor\\init.bat"],