Windows 10: custom .bat file, opening multiple tabs and executing a command in each one

Discus and support custom .bat file, opening multiple tabs and executing a command in each one in Windows 10 Ask Insider to solve the problem; sorry for rookie custom but I want to make my dev experience easier, so I want to create custom command .bat file in order to open multiple tabs and... Discussion in 'Windows 10 Ask Insider' started by /u/Gabotron_ES, Feb 26, 2021.

  1. custom .bat file, opening multiple tabs and executing a command in each one


    sorry for rookie custom but I want to make my dev experience easier, so I want to create custom command .bat file in order to open multiple tabs and executing a command in each one (For.example php artisan serve, npm run watch...).

    What I tried:

    C:\Users\GABRIEL\Desktop\custom-command.bat

    I created .bat file like this: ``` cmd.exe && cd C:\xampp\htdocs\kinshiki && php artisan serve

    cmd.exe && cd C:\xampp\htdocs\kinshiki&& npm run watch

    cmd.exe && cd C:\xampp\htdocs\ishhiki && expo start

    ```

    But when I execute file I get an error:

    "C:\Users\GABRIEL\Desktop\custom-command.bat" command is not recognized as an internal or external

    submitted by /u/Gabotron_ES
    [link] [comments]

    :)
     
    /u/Gabotron_ES, Feb 26, 2021
    #1
  2. sc00VN Win User

    .bat file

    A batch file (.bat extension) is basically a series of commands to be executed by the command-line interpreter. When you open the file, your system runs every command stored in the file from top to bottom, once the final command has been executed, it closes
    itself indicating it has finished its job. However, everything happens so fast you think it closes immediately and that's completely normal.

    If you want the command-line interpreter window to remains open once the last command has been executed, I suggest you do the following:

    - Right click on the .bat file and click on the 'edit' button.

    - It will open a notepad displaying a series of commands.

    - Create a new line by hitting enter after the final text and type in 'pause' without quotes.

    - Save the file and run it. This time the window will remain open.
     
    sc00VN, Feb 26, 2021
    #2
  3. Naki Win User
    Command line/tab

    QUESTION/suggestion:
    * Why not remember the last active tab?
    For example, if you are on tab 2 and close the program, then run it again, for the program to open tab 2 again. But if the -tab X command-line option is used, then the program goes to X tab, regardless of last active tab.

    Does that make sense?
     
  4. custom .bat file, opening multiple tabs and executing a command in each one

    .bat file

    Yes, when I click on bat file, command prompt opens and within seconds closing.

    It is not executing.
     
    MohammadTabrez1, Feb 26, 2021
    #4
Thema:

custom .bat file, opening multiple tabs and executing a command in each one

Loading...
  1. custom .bat file, opening multiple tabs and executing a command in each one - Similar Threads - custom bat file

  2. Notepad open new tab not working when opening a .bat file

    in Windows 10 Gaming
    Notepad open new tab not working when opening a .bat file: When I try to edit a bat file using notepad the notepad is open in a new window instead of a new tab and when I open the notepad app it opens two windows one with the bat file and one with my previous tabs....
  3. Notepad open new tab not working when opening a .bat file

    in Windows 10 Software and Apps
    Notepad open new tab not working when opening a .bat file: When I try to edit a bat file using notepad the notepad is open in a new window instead of a new tab and when I open the notepad app it opens two windows one with the bat file and one with my previous tabs....
  4. Can't execute .bat files.

    in Windows 10 Gaming
    Can't execute .bat files.: As you can see on this video i can't execute bat files. Can someone help me how can i fix it ? Im using windows 11.https://gifyu.com/image/SnaYY https://answers.microsoft.com/en-us/windows/forum/all/cant-execute-bat-files/8cd724f5-a004-48c6-a8a1-37729c652e48
  5. Can't execute .bat files.

    in Windows 10 Software and Apps
    Can't execute .bat files.: As you can see on this video i can't execute bat files. Can someone help me how can i fix it ? Im using windows 11.https://gifyu.com/image/SnaYY https://answers.microsoft.com/en-us/windows/forum/all/cant-execute-bat-files/8cd724f5-a004-48c6-a8a1-37729c652e48
  6. How to run multiple Windows .bat in one master .bat?

    in Windows 10 Software and Apps
    How to run multiple Windows .bat in one master .bat?: Hello All,I would sure appreciate some assistance with this. I have 20 individual batch files that I run routinely, which spin off sequentially numbered copies of a template into different folders. Rather than running through all 20 .bat files, double clicking each, how can I...
  7. How to run multiple Windows .bat in one master .bat?

    in Windows 10 Network and Sharing
    How to run multiple Windows .bat in one master .bat?: Hello All,I would sure appreciate some assistance with this. I have 20 individual batch files that I run routinely, which spin off sequentially numbered copies of a template into different folders. Rather than running through all 20 .bat files, double clicking each, how can I...
  8. How to run multiple Windows .bat in one master .bat?

    in Windows 10 Gaming
    How to run multiple Windows .bat in one master .bat?: Hello All,I would sure appreciate some assistance with this. I have 20 individual batch files that I run routinely, which spin off sequentially numbered copies of a template into different folders. Rather than running through all 20 .bat files, double clicking each, how can I...
  9. Using a bat file to open multiple excel files and webpage

    in Windows 10 Ask Insider
    Using a bat file to open multiple excel files and webpage: Hey Reddit, I am having trouble executing a .bat file. Below is what I have scripted. It open to Reddit in chrome (which I want) but it doesn't open the excel files. How can I do this? rem this is a test bat file to open multiple excel files and a webpage in chrome u/echo...
  10. Executing a .bat file on CMD

    in Windows 10 Support
    Executing a .bat file on CMD: Hello all, For a programming process we need to execute a .bat file from CMD. I'm on Windows 10 x64. When I paste the path to the file and hit Enter, the message below is expected to show up: Setting up environment for Qt usage... It happened a time and when we wanted to...