MS DOS Commands: C:/WINDOWS/system32
MS DOS Commands: C:/WINDOWS/system32
MS DOS Commands
Introduction
MS DOS stands for Microsoft Disk Operating System. To open DOS command prompt select
Start|Programs||Accessories|Command Prompt
Or simply type command in the search box and press enter key
The Command Prompt you see on the screen might look like this:
C:\WINDOWS\system32>
Each disc drive attached to a computer system is identified by a name. In MS-DOS, the name
is a single letter followed by a colon. e.g. A:, C:. Traditionally, A: is a floppy drive while C:
is a hard disc drive. They are also described as Drive A and Drive C. The system prompt
C:\WINDOWS\system32> identifies the default drive as drive C. Unless a command
specifies otherwise, it is the default drive which is used by MS-DOS whenever a request to
use a file is received. As is usual in computing, there is alternative name for the default drive.
It is also known as the current drive.
VOL Command
The disc can be given a volume identification label (or volume for short) when the disc is
formatted. To see the volume of a disc type on the command prompt:
D:\>VOL
LABEL Command
This command is used to give name to the drive. This command prompts you for a name.
D:\>LABEL
Pressing <Enter> leaves the computer's version of the date as it is whilst typing 05-04-17
would reset the date to 5th April 2017.
Similarly the command TIME allows you to check and reset the time.
D:\>TIME
The directory
The command DIR will make a listing on the screen of the files on your disc.
D:\>DIR
The following command will display all files with txt extension
D:\>DIR *.txt
* is called a wild card character
Viewing the contents of a large directory
DIR /P causes the output to pause at the end of each screenful. The display will resume when
you press any key.
DIR /W causes the file names to be displayed. Directory names are shown surrounded by [ ]
brackets.
DIR C: causes the directory in drive C to be listed even though the default drive may be
drive A.
Copying files
Copying files is usually a simple matter of creating a duplicate of a file in another directory.
You cannot create a duplicate in the same directory without renaming the file - otherwise the
operating system would not be able to distinguish between them. Sometimes copying files to
another location on your disc makes sense. Perhaps you want to place a copy of a file in an
UOG directory while continuing to work on it in the current directory.
D:\>COPY HELLO.TXT HELLO1.TXT
Deleting files
Files can be removed from a directory by using the DEL command:
D:\>DEL hello1.txt
removes hello1.txt from the current directory
Removing directories
RD command is used to remove a directory. We can only remove directories which contain
no files. Thus to remove ARCHIVE might use this sequence of commands:
D:\>CD ARCHIVE
D:\>DEL *.*
D:\>CD .. (This command moves us up to the parent directory)
D:\>RD ARCHIVE
Renaming a File
We use the RENAME command (REN for short) to change the name of a file. The general
format is:
D:\>REN {oldname} {newname} {ENTER}
e.g.
D:\> REN hello.txt hi.txt
Will rename file hello.txt to hi.txt
This will not work if a file with the new name already exists in the current directory.