BAT & CMD File Display

104 3

    Create a BAT File

    • You can create a BAT file in Notepad or any other text editing program. Open the text editor, type the desired commands, and then save the file with the “.bat” file extension.

    Using a BAT File

    • Batch files are often created to run repetitive tasks in DOS or Windows. An example of a BAT file that most users are familiar with is the “autoexec.bat” file. Commands that are included in this file are automatically executed when the operating system starts.

    Edit BAT File from CMD Window

    • You can open a BAT file in the Notepad text editor by running a command line statement in the DOS CMD window. Type “edit myfile.bat” at the CMD prompt where “myfile” is the name of your BAT file. Press “Enter.” The BAT file opens in Notepad and displays from the CMD prompt.

    Run BAT file from CMD Window

    • To run a BAT file, you can double-click the file in Windows. However, you can also run the BAT file from the CMD prompt. Type the name of the file, with the “.bat” file extension, at the CMD prompt and press the “Enter” key. For example, type “myfile.bat” at the prompt and press “Enter.” The BAT file executes.

Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.