This can be achieved with a few steps:

  1. Activate the “code” command from VScode itself: CMD + SHIFT + P or Ctrl + SHIFT + P
  2. Type in code and select the option “install "code" command in PATH"
  3. When you are in the directory of the files you want to open in VS Code, type ”code ." or ”code -n ."
  4. If nothing happens you will have to quit or restart the current Terminal session running.