There are two commands that are absolutely necessary to get started. One is the Dir command, and the other is CD. Dir is the Directory command, and it displays the contents of the currently selected directory, as shown in Figure 6-3. From right to left, the Dir command displays the date the directory or file was created, a designation of whether the listed item is a file or subdirectory, and then the name. This is the default display setting, and it can be modified, as you will see. Figure 6-3. The Dir command displays directory contents.CD is the Change Directory command, and it will let you move around your hard drive's directory tree. (You can also use CHDIR.) CD is the command equivalent of clicking from folder to folder in a Windows Explorer interface (more about Windows Explorer in Chapter 7, "Clicking Less"). Even the mildly curious should quickly pick up these two commands. You can further modify the behavior of the Dir command using any of these available switches:
You also can employ more than one search parameter at once. For example, if you typed dir /oge, the resulting output would place folders first in the list and then would group the listing according to extension, placing file extensions in alphanumeric order. The CD command lets you navigate your computer. Its general syntax is: CD pathname where pathname is the drive letter and folder, including subfolders, of the directory you are navigating to. For example, to change from the current directory shown in Figure 6-3 to the \Downloads directory on the D: drive, you would enter the following command: CD d:\downloads. The prompt would then change from C:\Documents and Settings\The Dude> to D:\Downloads, assuming that the \Downloads folder existed. If you type CD and then just a folder name, the folder must exist in the current directory. For example, the \Desktop folder exists as a subdirectory of C:\Documents and Settings\The Dude. To change to the \Desktop directory, I could just type CD desktop. You can also navigate up the folder structure by typing CD. (including the period). |