CD


The CD command changes the directory.

THE COMMAND
If you see a directory called "Apple" you can enter this directory by typing cd Apple:

C:\>CD APPLE



The prompt changes immediatly when you press enter. You are now in the directory Apple:

C:\APPLE>


If you don't see C:\APPPLE> but C>, you should change your prompt mode. This is possible with:

PROMPT $P$G


_________________________________________________________/

ENTERING DEEP DIRECTORIES
If you want to go to the directory A:\DOS\FILES\TXT, you can type:

C:\>A:
A:\>CD DOS
A:\DOS>CD FILES
A:\DOS\FILES>CD TXT
A:\DOS\FILES\TXT>


Such a rigmarole! Luckily it is also possible with only one command:

CD \directory1\directory2\...



If you want to go to a deep directory on a different drive, just add the drive.

CD X:\directory1\directory2\...



Example:

C:\>CD A:\DOS\FILES\TXT
A:\DOS\FILES\TXT>


_________________________________________________________/

GOING BACK TO THE ROOT
If you want to go to the highest directory of your drive, type:

CD\



Example:

A:\DOS\FILES\TXT\BOOK\CHAPTERS\C1>CD\
A:\>


_________________________________________________________/

JUST ONE DIRECTORY UP
If you just want to go one directory up, you don't need to re-enter a complete path. Just type:

CD..



Example:

C:\DOS\GAMES\KEEN\KEEN3>CD..
C:\DOS\GAMES\KEEN\>CD..
C:\DOS\GAMES\>CD..


Sponsors