Saturday, March 18, 2017

command line - Run a .bat file with CMDER

I have a .bat file that I want to run in Cmder not CMD



echo off
:begin
echo Select a task:
echo =============
echo 1) P1

echo 2) P2
echo -
set /p op=Type option:
if "%op%"=="1" goto op1
if "%op%"=="2" goto op2

goto begin

:op1
start cmd /k cd C:\Users\**\Documents\Projects\P1

cd C:\Users\**\Documents\Projects\P1
grunt serve

:op2
start cmd /k cd C:\Users\**\Documents\Projects\P2
cd C:\Users\**\Documents\Projects\P2
grunt serve

:end



I want when I click on the .bat icon to open Cmder and run commands and also open a new tab in Cmder like I did in cmd (start cmd /k cd C:\Users\**\Documents\Projects\P1).



Thank you in advance.



I found this but didn't help a lot:
https://github.com/cmderdev/cmder/issues/457

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...