I am writing script to setup environment variable based on tab index. eg. if tab 1 cd /d c:\proj1 if tab 2 cd /d c:\proj2 etc.
1 Answer
There is almost no sense to check the tab index or name - they may be changed in runtime by user at any time.
I recommend you to set some yours environment variable in the task to distinguish started consoles. E.g.:
set MyTabID=tab1 & cmd /k your-command-1
set MyTabID=tab2 & cmd /k your-command-2
1 Comment
Qin
Yes, I end up with: ConEmu /Reuse /run "%ComSpec% /k myscript.cmd c:\proj1" ConEmu /Reuse /run "%ComSpec% /k myscript.cmd c:\proj2"