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. Bat file for renaming multiple files using the command prompt

    in Windows 10 Gaming
    Bat file for renaming multiple files using the command prompt: Greetings,I had a messy .mp4 collection that need intensive naming rework. I have tried using u/Derrick19 guide as followingOpen PowerShell Navigate to the directory containing files using the cd command. For example: cd C:\path\to\your\filesRun the following...
  3. Bat file for renaming multiple files using the command prompt

    in Windows 10 Software and Apps
    Bat file for renaming multiple files using the command prompt: Greetings,I had a messy .mp4 collection that need intensive naming rework. I have tried using u/Derrick19 guide as followingOpen PowerShell Navigate to the directory containing files using the cd command. For example: cd C:\path\to\your\filesRun the following...
  4. A Dozen Windows 10 Customizations in One .bat File

    in Windows 10 Gaming
    A Dozen Windows 10 Customizations in One .bat File: This is for those Windows 10 users that don’t use the Group Policy Editor and rely on Registry edits to get the customizations/functions they want. There are many Registry edit type customizations available, but I routinely setup 12 of these edits on Windows 10 PCs. Rather...
  5. A Dozen Windows 10 Customizations in One .bat File

    in Windows 10 Software and Apps
    A Dozen Windows 10 Customizations in One .bat File: This is for those Windows 10 users that don’t use the Group Policy Editor and rely on Registry edits to get the customizations/functions they want. There are many Registry edit type customizations available, but I routinely setup 12 of these edits on Windows 10 PCs. Rather...
  6. A Dozen Windows 10 Customizations in One .bat File

    in Windows 10 Customization
    A Dozen Windows 10 Customizations in One .bat File: This is for those Windows 10 users that don’t use the Group Policy Editor and rely on Registry edits to get the customizations/functions they want. There are many Registry edit type customizations available, but I routinely setup 12 of these edits on Windows 10 PCs. Rather...
  7. 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
  8. 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
  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...