What Are Some Examples of Common DOS Commands

Published on January 2017 | Categories: Documents | Downloads: 33 | Comments: 0 | Views: 293
of 2
Download PDF   Embed   Report

Comments

Content

What are some examples of common DOS commands?

DAILY TIME RECORD

University Information Technology Services
What are some examples of common DOS commands?
The following is a list of useful DOS commands, with explanations. They are useful on older DOS systems and in the command-line interface on modern Windows systems. To access the command-line interface: Windows 7 or Vista: Click Start, type cmd, and then press Enter. Certain commands may require administrative access on Windows 7 or Vista. To launch the command line interface in administrative mode, click Start, type cmd, and then right-click the cmd or cmd.exe search result and choose Run as Administrator . Windows XP: Click Start, then Run. Type cmd, and then press Enter. Note: Where example files (e.g., file.ext, file1, file2), file extensions ( .ext), directories (e.g., diry, diry1, diry2), commands (e.g., command), and drive letters (e.g., a:, b:, c:) are given, substitute the name of your own file, directory, command, or drive letter. Since DOS is not case-sensitive, you can type these commands in either upper- or lowercase.
help help command command /? path=c:\windows;c:\dos prompt $p$g dir dir /w dir /p dir *.ext dir z???.ext

List commands (only in DOS versions 5 or later). See help for the DOS command. List switches for the DOS command. Specify in which directories DOS searches for commands or programs. Make the DOS prompt display the current directory. List files in the current directory in one column. List files in five columns. List files one page at a time. List all files with an .ext extension. List files with .ext extensions that have four letters and start with z (where z is a character of your choice). Search for the file.ext in the current directory and all subdirectories under the current directory; most useful if the current directory is the root (i.e., C:\). View the contents of the text file file.ext. Use the DOS editor to edit the file file.ext. Change to the a: drive. Make a new subdirectory named diry in the c:\ directory. Change to subdirectory diry. Remove the existing subdirectory named diry. Delete a file named file.ext. Rename file file1 to file2. Copy file file1 to file2. Turn on verification of copy commands. Turn off verification of copy commands.

dir file.ext /s

type file.ext edit file.ext a: md c:\diry cd c:\diry rd c:\diry del file.ext ren file1 file2 copy file1 file2 verify on verify off

1 of 2

3/30/2012 6:20 PM

What are some examples of common DOS commands?

DAILY TIME RECORD

xcopy diry1 diry2 /s xcopy diry1 diry2 /p diskcopy a: b: diskcopy a: a: format a: format a: /s backup c:\diry\*.ext a: backup c:\ a: /s restore a:\ c:\diry\*.ext restore a: c:\ /s ver time date cls scandisk

Copy all files and subdirectories in directory diry1 to diry2. Ask for confirmation of each file before copying it from diry1 to diry2. Duplicate a disk using two floppy drives. Duplicate a disk using the same floppy drive. Format a disk in drive a:. Format a bootable disk (include system files). Back up all files with the extension .ext in c:\diry\ to drive a:. Back up the entire c: drive to drive a:. Restore backed-up files with the extension .ext in drive a: to the c:\diry\ directory. Restore backed-up files and subdirectories from drive a: to c:\. Check the version of DOS. Check or correct the system time. Check or correct the system date. Clear the screen. Scan and check drive c: for errors. ScanDisk replaces chkdsk (see below) on DOS version 6.0 and above (including Windows 95). Check disk and memory usage of the current disk. Fix errors reported by chkdsk. Check a particular file. Check a particular drive (in this case, a floppy in the a: drive). Check memory usage.

chkdsk chkdsk /f chkdsk file.ext chkdsk a: mem

This list was adapted from the August 1991 issue of PC World magazine, Instant Reference Card #15, p. 237.

Copyright 2005-2010, The Trustees of Indiana University

2 of 2

3/30/2012 6:20 PM

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close