How to run a bat file in current windows terminal instead of open new cmd window? #7141

Closed
opened 2026-01-31 00:56:10 +00:00 by claunia · 1 comment
Owner

Originally created by @xinkunZ on GitHub (Mar 25, 2020).

  • I want to know, how to run a bat file just in the windows terminal
  • I have try to use call or start, but it did not work
  • everytime I open a bat file, It always open a ugly cmd window
  • anyone can help?
Originally created by @xinkunZ on GitHub (Mar 25, 2020). * I want to know, how to run a bat file just in the windows terminal * I have try to use `call` or `start`, but it did not work * everytime I open a bat file, It always open a ugly cmd window * anyone can help?
Author
Owner

@zadjii-msft commented on GitHub (Mar 25, 2020):

Thanks for the suggestion! This isn't something that's really supported by the Terminal currently. You can refer to #492 for more details.

You might be able to use the wt commandline arguments to serve the purpose you want. Something like wt cmd /c my_bat_file.bat would work to open a new Windows Terminal window running my_bat_file.bat.

@zadjii-msft commented on GitHub (Mar 25, 2020): Thanks for the suggestion! This isn't something that's really supported by the Terminal currently. You can refer to #492 for more details. You _might_ be able to use the `wt` [commandline arguments](https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingCommandlineArguments.md) to serve the purpose you want. Something like `wt cmd /c my_bat_file.bat` would work to open a new Windows Terminal window running `my_bat_file.bat`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7141