CSCI 1300, Section 100
Helpful Hints

Making your command history work

With Windows XP, the command prompt window will maintain a history of commands.  (To verify that the history is turned on, you can right click on the window header, select Properties then the Options tab, and you will see a box labeled Command History.  The size of the history list is specified by "Buffer Size".)  To scroll up or down this list, use the up or down arrow keys.

However, the gocs.bat script we provided screws up the history list.  (If you've downloaded the software after 9/11/03, I have made this fix to the file.) To fix this, edit gocs.bat with your favorite editor, go to the bottom of the file where you should see the last two lines:
Remove the line that says "COMMAND" and you should be all set.  You will have to open a new command prompt window and run gocs again to get the history working.

Configuring Windows XP so that starting the Command Prompt automatically executes the batch file

If you right click on the shortcut (for the command prompt) and go to properties, you'll open up a window. Go to the "shortcut" tab if it's not already open. In the Target field, you should see "%SystemRoot%\system32\cmd.exe". If you look up the help page for the cmd command, you can see a l of options for this command. One of these options is "/k". This allows you to carry out a command that you specify as a parameter. For example, to make it run the gocs batch file, if you change the line next to target to be "%SystemRoot%\system32\cmd.exe /k c:\cs1300\gocs.bat", then it will run the gocs batch file when it brings up the command prompt (if you use this shortcut).

Configuring Windows 98 so that starting the DOS Prompt automatically executes the batch file

Find the MS-DOS Prompt icon  in the Start Menu.  Right click on it, and select Properties.  The properties window will open.  On the Program tab, in the field labeled Batch file, enter "c:\cs1300\gocs.bat" (or wherever the cs1300 software is installed).  Click OK.  The batch file should now run whenever you start the DOS prompt.

Setting up a home directory for course work

You can create a home directory into which you save all your course work.  Type the following commands at the prompt:

cd c:\cs1300
md username

You would like the computer to switch to this directory whenever you open a DOS/Command Prompt window.  To do this, you must edit the gocs.bat file.  A batch file contains a sequence of DOS commands that is executed each time you type the file name.  You must add a command to change to your user directory at the end of the file.  Edit gocs.bat and before  the ":DONE" line at the bottom of the file, insert

cd c:\cs1300\username

Vi text editor

In case you have the perverse urge to emulate your professor and use vi instead of emacs, you can find information on a better version of Vi than is included in the course software at  This version is used by Professor Mozer in class and is also free.  A command summary and tutorial for Vi are available on the web.


The "syntax highlighting" feature of emacs will select colors for your C++ code to make it easier to read and parse.  To turn on syntax higlighting, choose Options|Syntax Highlighting.  To avoid having to make this selection each time you run emacs, choose Options|Save Options after you have turned on Syntax Highlighting.  Syntax highlighting will work only if emacs knows that you are editing a C++ program.  It knows this when the buffer is saved as a file with extension .cpp or when you open a file with extension .cpp.