This follow-up to "cmd abc's" shows you how to switch between folders on the DOS/Windows command line. In "cmd abc's," you learned that a file/folder hierarchy looks like an organization chart such as the following. See cmd abc's.
The command prompt displays the "default folder." When a command is executed, all files referenced are assumed to be in the default folder. If a file is in a different folder, the command must include the folder name with the file name. In the following example, the command prompt is currently set to the AA folder, and the first command references AA by default. Without changing the command prompt, the second command uses an explicit reference to the BB folder (the \bb\
1 - Implicit Reference to AA Folder
all GIFs in AA
2 - Explicit Reference to BB Folder
all GIFs in BB
CREATING A FOLDER
Folders can be created off the root or within other folders any number of layers below. These are technically "subfolders" or "subdirectories," but the term "folder" is commonly used to refer to a folder at any level.
The only tricky part to remember is that there is different syntax if you want to go back "up the tree" or "down the tree."
DOWN THE TREE
This example creates a JANINE folder within the default ABC folder. When switching to JANINE, there is no backslash in the syntax (this is important):
create JANINE folder
go to JANINE folder
C:\>ABC\JANINE> prompt changes
UP THE TREE
To go to a folder at the same or higher level, the backslash is used. This example creates a JANINE folder inside the XYZ folder, which is at the same level as the default ABC folder:
Suppose therea are three folders in the PLANS folder:
If the default is 2010, and you want to go to 2012, there are two ways to do it:
(..) up one level
go to 2012**
**Remember. No backslash (\) when you go down the tree.
When switching between folders on different drives, switch drives first. For example, to switch from C:\PLANS\2010> to D:\BUDGETS>, type:
(*) a shortcut
D:\BUDGETS> prompt changes
Folder Rule #1
When going to a folder on a different drive, change drives first, then change folders.
Folder Rule #2
The backslash represents the root folder. It is also used as a separator symbol between folder and file names.
Folder Rule #3
When using the CD command to go to a folder on the same or previous level, the path name must begin with the root (\).