kalzso
kalzso

Reputation: 536

Opening different WebStorm projects with batch file

I wrote a batch file that starts webstorm and starts other things too. I will just copy the relevant part here:

start /d "C:\Program Files (x86)\JetBrains\WebStorm 8.0.4\bin" WebStorm.exe

This works great, and was good when I had only just one project. And since WebStorm doesn't support opening multiple projects it start always with opening the last one that I was working on.

But, and here is my question:

How can I write a batch file that opens webstorm with specified project?

For example:

start /d "C:\Program Files (x86)\JetBrains\WebStorm 8.0.4\bin" WebStorm.exe  [[D:\Projects\A project]]

then in another script file I will write:

start /d "C:\Program Files (x86)\JetBrains\WebStorm 8.0.4\bin" WebStorm.exe  [[D:\Projects\B project]]

Thank you for your answer in advance!

Patry0t

Upvotes: 0

Views: 179

Answers (1)

LazyOne
LazyOne

Reputation: 165471

If you start WebStorm with path to the desired folder as a parameter (e.g. webstorm C:\projects\supersite.com) then it will:

  • either open existing project (IDE will check if .idea subfolder (project settings) is present)
  • or will create new project for that folder.

So yes -- you are moving in right direction.

P.S. I do not see why would you need .bat file for that -- add path to WebStrom folder into your PATH environment variable and Windows/DOS will be able to find it there (so there will be no need to use full path to webstorm.exe file).

Upvotes: 1

Related Questions