This tutorial is for Windows PC users who want to learn basic disk concepts as well as enter commands at the command prompt. These concepts and commands originated with the DOS operating system in the first PCs and were carried over to Windows.Programmers and power users often use the command line to copy, rename and manage files and folders. Commands typed on a command line often enable the user to perform an operation much faster than using a graphics-based application such as Windows Explorer.Where Is the Windows Command Line?To obtain the command line in Windows, look for the Command Prompt in the Start menu. It can be found in the Accessories folder in the Programs section. To exit the command line, type exit and press Enter.
HOW A DISK IS ORGANIZEDDOS/Windows disk drives are identified by a letter and colon. The floppy drive (if used) is A:, and the hard drive is C: Additional hard drives and CD/DVD drives are named D:, E: and so on. FOLDERS/DIRECTORIESDisks are further divided into simulated file folders. Each of them is called a "folder" or "directory," and its size is limited only by the space left on the disk.Your software package's install program creates the application folder and copies the appropriate files into it. However, there are times when you may want to organize your own data by creating your own folders and moving data files among them. Root FolderA disk is organized in a hierarchical fashion like an organization chart. The top of the hierarchy is the root folder (directory). In an old DOS computer, there were configuration files in the root folder. In a Windows computer, there are only hidden files, and the root folder serves as a starting point for all the other folders on the disk. USB flash drives may also contain folders.Folder or Directory - Which?The Internet is based on Unix, which uses the term "directory" rather than "folder." Today, the two terms are used interchangeably. In fact, although the Mac popularized the term "folder," when the original Mac OS was replaced with the Unix-based Mac OS X operating system, even Mac users began to say "directory." The result... a folder is a directory is a folder.Remember!When working with files or executing programs from the command line, and even in Windows Explorer, your reference point is always the "current," "working" or "default" drive and folder. THE COMMAND PROMPTThe command line is ready to accept a command when the "prompt" is displayed. The prompt also indicates where the action takes place; for example, the following prompt refers to the C drive and root folder: C:\>The C: is drive C. The backslash (\) means root folder, and the greater-than symbol (>) terminates the prompt. If you were in the DATA folder, the prompt would be C:\DATA>.Switching FoldersAssume you have the following folders on your hard disk:If you are in C:\DATA> now, and you want to go to C:\WORDS>, you would type: C:\DATA>cd \words change to WORDS C:\WORDS> prompt has changed cd \words means CHANGE TO ROOT then WORDS cd \ wordsSwitch back to the root folder by typing: C:\WORDS>cd \ change to root C:\> prompt has changedSwitching DrivesTo switch from one drive to another, type the drive letter and colon as follows. Be sure to include the colon. C:\>d: change from C to D D:\> prompt has changed EXECUTING COMMANDSCommands are run by typing them on the command line and pressing enter. Commands generally require one or more parameters after the command verb; however, there are exceptions:dir list file names cls clear screenWhen wild card symbols are added to the DIR command, it becomes selective as in the following examples:dir *gif list all GIF file names dir abc.* list all files named ABCMore examples of how commands are used:format d: format the D: drive ren a.txt b.txt rename A.TXT to B.TXT copy a.txt d:\ copy file to root of D: MORE DETAILS, COMMANDS AND TOPICSTo learn more about switching between folders on the command line, see cmd folders. Following are common command line operations:Dir Command OptionsSee Dir.Copy Files and FoldersSee Copy and Xcopy.Create and Remove FoldersSee Mkdir and Rmdir.View/Change File PermissionsSee Attrib.Create a Batch FileSee batch file abc's.Clear the ScreenSee CLS.Compare FilesSee Fc.File Names and Extensions.See file name.File Selection Using Wild CardsSee wild cards. End of CMD ABC'sYou can perform many operations and save time using the command line in Windows. Good luck!