health

vehicles

business

Powered by Blogger.

How to make a Batch File in CMD


Below are steps on how to make a batch file using Microsoft Command Prompt (CMD). If you are more comfortable with Microsoft Windows, you can use any text editor (such as Notepad or WordPad) to create your batch files; as long as the file extension ends with .bat. In the example below, we use the Windows Notepad to create a batch file.
  1. Press Windows + Q
  2. Type Notepad in the Search Box
  3. Open Notepad
  4. Once Notepad is ready, type the below codes
@echo off
echo Hello this a test batch file
pause
dir c:\windows
pause
      5. Click File and then Save, and then navigate to where you want to save the file. For the file name, type "batch.bat", and if your version of Windows has a "Save as type" option, choose "All files", otherwise it saves as a text file. Once you have completed these steps, click the Save button and exit notepad.
     6. To run the batch file, double-click it like any other program. Once the batch file has completed running it closes automatically.

If you enjoy the post, share with friends and always visit for more updates

No comments:

Post a Comment