Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Unable to run command on Batch File

I have a batch file to open directories on Windows Terminal.

Currently there are 2 lines on my script:

cmd.exe /c wt.exe --window 0 new-tab --profile "RAN" --title "Components" --tabColor "#8AD8FF" --colorScheme "One Half Dark" -d "C:\RAN\components-page"

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

And have a one for multiple panes:

cmd.exe /c wt.exe --window 0 new-tab --profile "RAN" --title "Address" --tabColor "#9C37FF" --colorScheme "One Half Dark" -d "C:\RAN\address-page" ; split-pane -V -p "RAN" --title "Address Info" --tabColor "#9C37FF" -d "C:\RAN\address-info-page"

The thing is that it does work to open I get a page like this:

What the command loads

What I would like to do is simple to have that but in the same script make it start my pages, by doing by running the command yarn start:local in that directory, as currently I can only do it manually.

Is there a way to do this?

I have added at the end of the -d (directory address) a && yarn start:local.START but hasn’t work, no other online info I tried has work so far.

>Solution :

Seeing that you are using powershell in Windows Terminal, you can just add at the end: powershell -NoExit "yarn start:local". So you’re end command would be something like:

cmd.exe /c wt.exe --window 0 new-tab --profile "RAN" --title "Components" --tabColor "#8AD8FF" --colorScheme "One Half Dark" -d "C:\RAN\components-page" powershell -NoExit yarn start:local

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading