Dos Commands
Dos Commands
MICROSOFT EXCEL
CONDITION FORMATTING
SORTING & FILTERING
PIVOT TABLE
MACRO IN EXCEL
DOS COMMANDS
A command generally means an instruction written in computer acceptable
language that the user types to execute a specific operation on the DOS
prompt. The command interpreter accepts our input in a specific form. This
specification is known as the syntax and the output is known as DOS
command.
There are two types of DOS commands :
INTERNAL COMMANDS
1. CLS
PURPOSE - Erases all characters and graphics from the screen; however, it does not change
the currently-set screen attributes. to clear the screen of everything but the command prompt
and the cursor.
2. COPY CON
PURPOSE - It is used to create a file in the existing directory. Here CON is a DOS reserved word
which stands for console.
PURPOSE - This command is useful in copying one or more files to another file or location.
SYNTAX - COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B] [+ source [/A |
/B] [+ …]] [destination [/A | /B]]
destination This specifies the directory and/or filename for the new file or files.
Specifying this switch uses short filename, if available, when copying a file with a non-8dot3 file
/N name.
If destination file already exists, this switch suppresses prompting to confirm you want to
/Y overwrite it and does it asap.
Contrary to above switch, this causes prompting to confirm you want to overwrite an existing
/-Y destination file.
4. CD (or CHDIR)
Purpose – CD stands for create or change directory and it allows to display the name of or change the
current directory or rather we can say come out of a directory.
PURPOSE - This command is used to display the system current date setting and prompt you to
enter a new date.
6. DEL
7. DIR
Displays files with specified attributes. The possible attributes are as follow: D →
Directories, R → Read-only files, H → Hidden files, A → Files ready for archiving, S →
/A:attributes System files, – Prefix meaning not
/B display in bare format with no heading information or summary
Using this attribute with dir by default displays the thousand separator in file sizes.
/C To disable display or separator use /-C
/N Display in new long list format where filenames are on the far right.
Displays list by files in sorted order. The sortorder attributes are as follow: N → By
name (alphabetic), S → By size (smallest first), E → By extension (alphabetic), D →
/O:sortorder By date/time (oldest first), G → Group directories first, – Prefix to reverse order
Display page wise pausing after each screenful of information and prompts to press
/P any key to continue.
Displays files in specified directory and all subdirectories. Bear caution in using this
in your root directory as you may end up in overflowing information. To stop the
/S screen overflow at any point hit Pause-Break key.
This sorts and displays the list based on time field specified. C for Creation, A for
T:timefield Last Access, W for Last Written
/X This is used to display the short names generated for non-8dot3 file names.
8. MD
PURPOSE : MD (or MKDIR) command stand for make directory and it is used to create a
directory.
Syntax - MD [drive:]path
9. PATH
PURPOSE : This command displays the path that how we have come to the present position or
sets a search path for executable files.
10. PROMPT
PURPOSE – This command is used to change the MS-DOS command prompt. The user can on/off the
prompt by using this command.
PURPOSE - RD (or RMDIR) command removes or deletes a directory. There are two conditions to remove
any directory – (1) Directory to be removed should be empty. and (2) We should be outside the directory
we are commanding to delete.
12. REN
PURPOSE - This command is used to change/modify the name of a file or files.
14. TYPE
PURPOSE - This command is used to display the contents of a text file or files.
Syntax - TYPE [drive:][path]filename
15. VER
PURPOSE - This command displays the version of the Microsoft Windows running on your computer.
Syntax – ver
16. VOL
PURPOSE - It displays the disk volume label and serial number, if they exist for the drive specified. If no drive
is specified it displays for the active drive.
EXTERNAL COMMANDS
1. ATTRIB
PURPOSE - The main purpose of this command is to remove and set file attributes (hidden, read-only,
system and archive). The attributes provide security to software programs. It displays, sets or removes
the read-only, hidden and archive file attributes assigned for a file or directory.
2. CHKDSK
PURPOSE - This command is used to check a disk and display a status report with properties of disk like serial
number, volume label, memory and other properties along with errors on the disk if any.
Syntax - CHKDSK [volume path] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]
3. DELTREE
PURPOSE - This command is used to remove a directory along with its
contents.
4. DISKCOPY
PURPOSE - This command copies the contents of one floppy from the source drive to a
formatted or un-formatted floppy disk in the destination drive. This command copies the data
from particular position on the source disk to exactly the same position on the destination disk.
Syntax Diskcopy A: B:
copies contents of A: to B: drive. This command can be used with /V switch
which verifies that the disk is copied correctly.
5. LABEL
6. FORMAT
PURPOSE - This command creates a new root directory and a File Allocation Table (FAT) for the disk.
In order for MS-DOS to be able to use a new disk you must use this command to format the disk.
7. SORT
PURPOSE - This command is used to arrange the data of a file in alphabetical order (A-Z, 0-9) or
reverse alphabetical order.
8. RESTORE
PURPOSE : The RESTORE command restores files that were backed up by using
BACKUP command.
Here drive1 specifies the drive on which backup files are stored.
drive2:path specifies the path to which those backup files will be restored.
► Using backup command with /S switch is used to restore all backup files to their
original directories and sub-directories.
9. DOSKEY
PURPOSE - This command is generally used to edits command lines and recalls
commands.
Here, /REINSTALL installs new copy of doskey, /HISTORY is used to display all
previously given commands stored in memory. And [text] specifies the commands you
want to record.
10. TREE
PURPOSE - This command is very useful to view the list of directories and subdirectories
present on the disk in graphical form. If you wanted to include files also with directories and
subdirectories, then you’ll have to give the command line as tree/f which presents the tree view
of all the content on your disk.
Syntax : TREE [drive:path] [/F] [/A]
In case you wanted use ASCII instead of extended characters, then go ahead include /A in the
command line.
11. EDIT
Using switch /B you can force the edit in monochrome mode. /H displays the maximum
number of lines possible for your system hardware. Whereas using /R and /S one can
load files in read-only mode and force the use of short filenames respectively.
[filename(s)] is used to specify file(s) to go edit. You can use wildcards (* and ?) to
specify multiple files.
MS WORD TASKS