Download presentation
Presentation is loading. Please wait.
Published byJesse Hill Modified over 9 years ago
1
The Command Line Yep, you need to know this
2
The Basics Start with the Prompt, what the computer tells you when ready for a command You type a command and press ENTER when you want to send it to the computer Computer may come back with text about what it did (or did not do) and then will present the Prompt once more
3
Accessing the Command Line XP: Run dialog box; type CMD or COMMAND Vista/7: Search Dialog box; same command Right-click shortcut and select Run As Administrator for commands that affect Windows
4
Focus Command Line always focused on a drive and directory; prompt will show both C:\Windows\System32> has focus on C: drive and Windows\System32 folder Change focus – Type drive letter and colon, then ENTER – Type CD and directory name to drill down – Type CD.. To go up a level DOS will remember drive and directory
5
Filenames Everything is a file to the computer Each file has a name: 8.3 format Windows allows 255 characters in file name Extension (should be) unique to application that created the file; changing the file extension does not change the file contents Windows uses file extension to determine: a) Program that created it and b) What icon to use for the file
6
ASCII American Standard Code for Information Interchange Each unique method of binary organization is called a file format ASCII defines 256 eight-bit characters First, universal, file format still used for configuration files
7
Folders Also called directories Any file at the root of the directory tree is said to be in the Root Directory A folder within a folder is a sub-directory or subfolder Any folder can have many subfolders and files; names have to be unique unless in different folders
8
Path The route to a file; listing of drive and directory structure to get to the file: – C:\Windows\System32\Notepad.exe This is the path to the file and its full name
9
Command.com Shifts command to upper case Looks within command.com Looks within the current directory (focus) Looks in directories specified in the PATH Returns “Bad command or file name” /? Will bring up help on the command
10
Oh No! DOS will do what you say, not what you mean so double-check spelling and syntax before the Enter key is pressed I wanted a directory listing, but I typed DEL instead of DIR
11
DIR Shows the contents of the current directory Can show another directory if you point it there: dir c:\windows Dir /w will give you a five-column display Dir /p will pause at each screenful of information
12
CD Change directory CD will take you down to that directory CD.. Will take you up one directory level CD \ will take you to the root directory for the drive
13
Move between drives Type the drive name followed by a colon and then press enter A: will take you to the A: drive C: will take you to the C: drive Command will remember what directory you were in on each drive when you switch
14
MD MD to make a directory New directory is directly below current directory Automatically creates. (dot) and.. (double- dot) files. Dot is current directory; double-dot is parent directory (one up) Does not tell you anything if it worked
15
RD RD to remove (empty) directory (only. and.. Files remain Removes directory below current directory RD /s will remove files, subdirectories and directory
16
Running a Program Your computer can only run files with the extensions:.exe,.com or.bat You do not have to type the extension to run the file/program
17
ATTRIB Attrib displays the attributes (H,S,R,A) for a file Attrib + turns on the attribute Attrib - turns off the attribute
18
Wildcards * (shift-8) replaces any number of characters ? Replaces just one character Can be used anywhere a file name is legal DIR a*.* will find any file that starts with “a” in the directory and has any extension
19
REN Renames a file name to a new name REN
20
DEL BE VERY CAREFUL WITH THIS COMMAND!!!! Deletes one or more (if you use wildcards) files; all gone, no going back Will not remove directories Actually, replaces the first character with Σ You don’t get a response
21
Copy/Move Copy Copy d:\win98\*.* c:\win98\*.* will copy all files from the D: drive (optical drive) win98 directory to the C:\WIN98 directory – will not change file names There is no “undo” for copy/move gone wrong
22
XCOPY Allows copying of directories, files and subdirectories at one time Xcopy c:\data d:\data /s/e will copy everything in the c:\data directory to a d:\data directory including files and subdirectories (/s) even if empty (/e)
23
Robocopy Robust copy command Allows you to copy files and directory structures across a network Found in Vista and 7
24
CHKDSK Command line version of Error Check Usually fails when you start it because it can not lock the drive; will run next time Windows restarts
25
Format We have a whole presentation on this Format c: /s will format c: drive and install system files (DOS)
26
Hostname Will give you the name of the computer
27
SFC System File Checker SFC /scannow Will attempt to set computer disk to be the same as installation disk; I think it eats Service Packs
28
Shutdown Guess what it does
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.