How to Create a Basic Program on Windows

Create a batch file using any command the interpreter would accept interactively (at the command prompt)., Open Notepad as your editor because it does not automatically add any formatting codes to the files., Type @echo, then strike to go to the...

13 Steps 2 min read Medium

Step-by-Step Guide

  1. Step 1: Create a batch file using any command the interpreter would accept interactively (at the command prompt).

    You may use conditional branching and looping within the batch file, such as: "if..."

    "for..."

    "goto..." and labels (a label is a made-up line-name used with goto... for example goto get-value, then you would have a subprogram labeled get-value).
  2. Step 2: Open Notepad as your editor because it does not automatically add any formatting codes to the files.

    Other processors have a bunch of codes that would disrupt the batch file. ,,, You can repeat echo (put your text here) lines as much as you want.

    Replace (put your text here) with your desired text. ,, The bat extension lets the system know to treat the file as "executable".

    Replace the your file name with a meaningful filename. , It won't do much, but it is a start. , It appears somewhat differently under the various versions of Windows such as:
    XP and 2000 (and 2000+) batch files (*.bat) can be run in a special window called the "Command Prompt" accessed by finding the Run box and typing in c:\window\system32\cmd.exe (or instead of cmd.exe you may have to use command.com).

    Notice the "\" character is called "backslash"

    and the forward slash "/" will not work at all in a command line.

    Windows 7 has no run box, but has the "Run..." option instead, which is also found near the bottom of the "Start Menu".

    Click it to access the command prompt and type in c:\window\system32\cmd.exe (or instead of cmd.exe you may have to use command.com).
  3. Step 3: Type @echo

  4. Step 4: then strike to go to the next line.

  5. Step 5: Then type echo followed by what you want it to say

  6. Step 6: such as: echo cheese so the interpreter will display: cheese.

  7. Step 7: Then go to the next line and type pause.

  8. Step 8: When you save it

  9. Step 9: use Save file type: *.txt because it is non formatted

  10. Step 10: plain text.

  11. Step 11: Change your the ".txt" file name from "your file name.txt" to "your file name.bat".

  12. Step 12: Save it to run it.

  13. Step 13: Use the "Run box" in the bottom of the "Start Menu" of the desktop task-bar.

Detailed Guide

You may use conditional branching and looping within the batch file, such as: "if..."

"for..."

"goto..." and labels (a label is a made-up line-name used with goto... for example goto get-value, then you would have a subprogram labeled get-value).

Other processors have a bunch of codes that would disrupt the batch file. ,,, You can repeat echo (put your text here) lines as much as you want.

Replace (put your text here) with your desired text. ,, The bat extension lets the system know to treat the file as "executable".

Replace the your file name with a meaningful filename. , It won't do much, but it is a start. , It appears somewhat differently under the various versions of Windows such as:
XP and 2000 (and 2000+) batch files (*.bat) can be run in a special window called the "Command Prompt" accessed by finding the Run box and typing in c:\window\system32\cmd.exe (or instead of cmd.exe you may have to use command.com).

Notice the "\" character is called "backslash"

and the forward slash "/" will not work at all in a command line.

Windows 7 has no run box, but has the "Run..." option instead, which is also found near the bottom of the "Start Menu".

Click it to access the command prompt and type in c:\window\system32\cmd.exe (or instead of cmd.exe you may have to use command.com).

About the Author

B

Brandon Kennedy

Creates helpful guides on pet care to inspire and educate readers.

29 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: