Command Prompt for Windows




Automatic Directory Changing

When a path name is entered at the command prompt, the WinOne® Command Prompt will attempt to change to the path specified. This process is referred to as Automatic Directory Changing, since it does not require the use of the commands CD and CDD to be used. The path name can include an optional drive and any number of nested directory names, including the use of dot characters to specify the current directory ( . ) and the parent directory ( .. ). For example, assume the current directory is D:\WIN_ONE, then to change to the Windows directory, enter at the command prompt :-

D:\WIN_ONE> ..\WINDOWS

the new prompt will then be :-

D:\WINDOWS>

Similarly, to change to the root directory of the current drive, enter at the command prompt :-

D:\WINDOWS> \

the new prompt will be :-

D:\>

When a program has the same name as a directory, then the WinOne® Command Prompt will execute the program, instead of changing to the specified directory. To avoid this situation, simply enter an additional directory separator at the end of the path. When using the TAB key to expand a directory name, then there is no need to include an additional directory separator, since the expanded directory name will already include the extra directory separator. Similarly, expanding a directory name using the TAB key will also ensure that double quote marks are included when a directory includes the use of space characters or special characters. Generally, space characters or special characters appear in long file names.