How to Run a BAT File on Windows: 13 Steps (with Pictures) (2024)

Download Article

Explore this Article

methods

1Running in File Explorer

2Running in Command Prompt

Other Sections

Related Articles

Written byTravis Boylls

Last Updated: August 28, 2019Tested

Download Article

This wikiHow teaches you how to run a BAT file—also known as a batch file—on a Windows computer. Batch files have many purposes, such as automating frequently used tasks. You can run them in the normal File Explorer, or you can launch them from the command line of the Command Prompt.

Method 1

Method 1 of 2:

Running in File Explorer

Download Article

  1. 1

    Open Start

    . Click the Windows logo in the bottom-left of the taskbar to launch the start menu.

  2. 2

    Click

    File Explorer. It's in the left-side column of the start menu.

    • You can also right-click on the Windows icon in the task bar and select File Explorer.

    EXPERT TIP

    A wikiHow Staff Editor reviewed and edited this article to make sure that it is comprehensive, helpful, and accurate. Our team of experienced and carefully-trained writers and editors improves articles using quality research sources, and academic and personal experience.

    How to Run a BAT File on Windows: 13 Steps (with Pictures) (9)

    wikiHow
    Staff

    If you don't see the File Explorer option, right click on Settings.
    Select the folders you want to appear on the Start menu. In this case, select the File Explorer.
    You can also select Videos, Music, Downloads etc.

    Advertisem*nt

  3. 3

    Go to the folder that contains your BAT file. Navigate to the location of your batch file or you can search for by clicking This PC in the left pane and typing the filename in the search bar at the top-right.

  4. 4

    Double-click the BAT file. Normally, to run a batch file, all that is needed is to double-click the file. If you are experiencing problems running the file successfully you can try running it as an administrator.

  5. 5

    Right-click the file and select Run as administrator. Depending on what the batch file is programmed to do, running it with administrator privileges may be required.

    • Oftentimes, batch files don't do much visually on your computer, and running them will make changes to your computer behind the scenes. Be sure you understand what your batch file is supposed to do, as it may have run successfully even though it didn't look like anything happened.
  6. Advertisem*nt

Method 2

Method 2 of 2:

Running in Command Prompt

Download Article

  1. 1

    Open Start

    . Click the Windows logo in the bottom-left of the taskbar to launch the start menu.

  2. 2

    Type cmd into start. As you type, Windows will filter search results below your text in the Start Menu.

  3. 3

    Right-click on Command Prompt

    . It's the black icon with the white text in the upper-left corner.

  4. 4

    Click Run as administrator. Running command prompt with administrator privileges might be required depending on what your batch file is programmed to do.

  5. 5

    Type cd followed by the file's location. Type the letters "cd", which is the command to "change directory"—and then type a space—followed by the folder location the batch file is in. For example, if your batch file is located on the desktop of the username "Jeff", you would type:
    cd /Users/Jeff/Desktop.

    • Don't forget a space between "cd" and the file's location.
  6. 6

    Press Enter. This changes the current directory to the new location you specified.

  7. 7

    Type the BAT file's full filename. That means typing the filename and extension, ending with .bat at the end. For example, if your batch file is named "install", then you would type install.bat into the command prompt.

  8. 8

    Press Enter. This will run the BAT file. If you see the same command prompt location as before and the cursor is blinking, the batch file has finished running.

    • Note any errors that appear in the command prompt from running the batch file, as that may be helpful in troubleshooting something wrong the batch file's code.
  9. Advertisem*nt

Expert Q&A

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

      Advertisem*nt

      Submit a Tip

      All tip submissions are carefully reviewed before being published

      Submit

      Thanks for submitting a tip for review!

      About This Article

      How to Run a BAT File on Windows: 13 Steps (with Pictures) (24)

      Written by:

      Travis Boylls

      wikiHow Technology Writer

      This article was co-authored by wikiHow staff writer, Travis Boylls. Travis Boylls is a Technology Writer and Editor for wikiHow. Travis has experience writing technology-related articles, providing software customer service, and in graphic design. He specializes in Windows, macOS, Android, iOS, and Linux platforms. He studied graphic design at Pikes Peak Community College. This article has been viewed 195,991 times.

      How helpful is this?

      Co-authors: 5

      Updated: August 28, 2019

      Views:195,991

      Categories: Windows Files

      In other languages

      Русский:запустить BAT–файл в Windows

      Deutsch:Unter Windows eine BAT Datei ausführen

      Français:exécuter un fichier batch sous Windows

      Español:ejecutar un archivo BAT en Windows

      Português:Executar um Arquivo BAT no Windows

      Bahasa Indonesia:Menjalankan Berkas BAT di Windows

      Nederlands:Een batchbestand draaien in Windows

      हिन्दी:विंडोज पर BAT फ़ाइल रन करें (Run a BAT File on Windows)

      • Print
      • Send fan mail to authors

      Thanks to all authors for creating a page that has been read 195,991 times.

      Is this article up to date?

      How to Run a BAT File on Windows: 13 Steps (with Pictures) (2024)

      References

      Top Articles
      Latest Posts
      Article information

      Author: Trent Wehner

      Last Updated:

      Views: 6423

      Rating: 4.6 / 5 (76 voted)

      Reviews: 83% of readers found this page helpful

      Author information

      Name: Trent Wehner

      Birthday: 1993-03-14

      Address: 872 Kevin Squares, New Codyville, AK 01785-0416

      Phone: +18698800304764

      Job: Senior Farming Developer

      Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating

      Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.