0

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 1

0

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
Sign up to request clarification or add additional context in comments.

1 Comment

Yes, I end up with: ConEmu /Reuse /run "%ComSpec% /k myscript.cmd c:\proj1" ConEmu /Reuse /run "%ComSpec% /k myscript.cmd c:\proj2"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.