The PC Primer: The PATH exercise

The PATH exercise

You are advised to print this exercise out. It will save switching between applications

PATH

The path statement sets or displays a search path for executable files, that is files with the suffix .exe (executable), .com (command), or .bat (batch).

Syntax

PATH [[drive:]path[;...][;%PATH%]

PATH ;

Type PATH ; to clear all search-path settings and direct cmd.exe to search only in the current directory.

Type PATH without parameters to display the current path.

Including %PATH% in the new path setting causes the old path to be appended to the new setting.

The Exercise

 (1) Go to the 'Start' button at on the task bar and 'click' on it.

 (2) Select 'Run' and 'click' on it.

 (3) In the dialogue box that appears, type command and hit the return key.

 (4) A black command window will appear, at the prompt type path and hit the return key.

A line similar to that shown will appear, showing the directories in the current path.

 (5) At the prompt type notepad and hit the return key. The Windows 'Notepad' application will start. Notepad is in the search path and was found.

 (6) Close Notepad.

 (7) In the 'Command' window type path; THIS WILL REMOVE THE CURRENT PATH, HOWEVER THIS WILL BE RESET WHEN THE COMMAND WINDOW IS CLOSED, OR THE COMPUTER IS RESTARTED! .

 (8) At the prompt type notepad and hit the return key. The Windows 'Notepad' application is NOT in the search path cannot be found.

 (9) Shutdown and restart your computer. If you wish repeat steps 1-4.