Navigation
From CastleCopsWiki
In Windows we talk about folders and sub folders. Using the Command Line we talk about directories and sub directories. This is a more accurate description of the filing system (whether FAT or NTFS) and so this convention is followed here.
When you open My Computer in Windows you see icons representing the disk drives on your system. To see the folders on the C: drive you must open this drive by double clicking. To see the folders within the Windows folder you must open the Windows folder by double clicking. And so on.
The same system must be followed when using the Command Line. To change to a different drive, type the drive letter followed by a colon (c:, d:, e:, etc.). To change to a different directory, use the cd ('Change Directory') command followed by the name of the directory (for example:
cd windows
Remember that you can only move to a directory that is directly below the location you start from using this method. For example starting from the root of the c: drive (c:\) you could move to the windows directory (using the command cd windows) but not to the system directory. To do this you would have to use the full path as an argument:
cd c:\windows\system.
There are a couple of shortcuts which ease navigation:
cd..
and
cd\
cd.. takes you to the next directory level up. Thus if we are in c:\windows\system, typing cd.. will take us to c:\windows. Typing cd.. again will take us to c:\ - the highest level of the directory structure on the c: drive.
cd\ will always take you back to the root of the drive (c:\ if you are in the c: drive).
Finally, commands and arguments tend to comply with the 8.3 file naming convention from the days of DOS - a maximum of 8 letters in the filename, a dot, and a 3 letter file extension (finances.doc, for example). Windows allows up to 255 characters in a filename along with certain characters which are forbidden under DOS (the space, for instance).
To get around this limitation using the Command Line, arguments containing filenames or directory names not conforming to the 8.3 convention should be enclosed in double quotes (""). Strictly speaking the cd command does not require double quotes in the argument, but it is a useful habit to use them, as other commands require them:
cd "c:\documents and settings"
