It's programming time!/Batch/Help with Help

From Create Your Own Story

Help with Help

It's not convenient to have to make and run a batch file every time you want to use help. Here's another way to use it.

This example may output some files. Be careful not to overwrite something accidentally.

Let's open up the console window.
In Windows Press ( + R) to open the Run window.
Type cmd into the Run Window, then press OK.
When the console window loads type the following into the command prompt:
md "C:\Users\''Your User Name''\Documents\BatchFolder"

Then press Enter. It will make the directory given as an argument. You can also use mkdir instead of md.

Then type:

cd "C:\Users\''Your User Name''\Documents\BatchFolder"

Then press Enter. This will change the current directory. You can also use chdir instead of cd.

Now type:

help > help ref.txt

This will create a file named help ref.txt in the current directory containing the output of the help command. Be aware that it will overwrite any currently existing file of the same name, so be careful pressing enter. Now you have a reference file to access whenever you want.

Now let's get more specific. You can type help followed by a specific command.

To give a few examples, with the console window open type:
help echo
help dir
help more

or

help help

For more help fun try:

help more | more

You can also open batch files from the command prompt.

At the command prompt type:

echo @echo OFF>helloworld.bat
echo echo Hello World!>>helloworld.bat
helloworld

Note you don't need to add the .bat extension for commands, like files with .bat, .com and .exe extension.

Personal tools