Extelliqent
Extelliqent

Reputation: 1860

VSCode Win Shortcut to Launch with Open Folder Command

I have 10 applications that I constantly work on. At times I need to open them all up separately to run bash commands on them. Is there a way I can create a windows shortcut for each folder, then I select all 10 shortcuts and click enter to initiate 10 different VSCode applications each opens up with their respective folder I set to?

Upvotes: 8

Views: 10459

Answers (4)

Thomas Dixon
Thomas Dixon

Reputation: 11

I use a batch file like in Sean's solution. You can automatically close the terminal after launch if you use the start command rather than "code ."

Here's an example:

@echo off
cd "C:\path\to\your\project\folder\"
start "" "C:\Program Files\Microsoft VS Code\Code.exe" .
exit

Note: if you don's like how the batch file looks, you can make a shortcut to the batch file and change the shortcut's icon to the VS Code icon.

Upvotes: 1

Amolski
Amolski

Reputation: 191

(Windows 10) To open VS Code in desired directory using shortcut:

  • Create shortcut to Visual Code Studio app,
  • Right click on the shortcut and select Properties,
  • In Target field append your directory path (remember to use quotes " " if there are spaces in the path).

Screenshot

Upvotes: 19

Sean Anderson
Sean Anderson

Reputation: 1

In a similar situation, I use a batch file to launch my most used vscode windows. I am not yet smart enough to make the cmd windows disappear after they open vscode, but maybe someday. In each batch file, use the following changing the directory for each project.

@ECHO OFF
cd C:\directory\where\your\project\is
code .
exit

Upvotes: 0

Mr Coder
Mr Coder

Reputation: 523

ctr + K + O open a folder vs code most common shortcut key available all platforms same enter image description here

https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf

Upvotes: 1

Related Questions