DOS Interview Questions and Answers

What is a batch file, give an example?

Batch files are special files with extension bat or cmd, which are often called scripts file that allows us to automate the task. Batch files contains a list of commands that are always executed together and in sequence, because we run the batch file as "command" instead of running each command individually.

We can create a batch file by using any text editor like the Notepad and by entering some lines of commands, and to save the file with an extension BAT or CMD.
To Run a batch file it require double clicking on it and it can also be run via command prompt or the windows start-Run line.

Open the new text file and enter the following text in it and saved the file as "mybat.bat"-

REM This is an example of BAT file output.
REM what we have...

This batch file contains two remarks i.e. "REM" which are used to provide notes or message by either the author or for the user of the file. Everything wrriten between the @ECHO On and off commands is displayed on the screen during the script's execution. After the second remarks/REM, there is a simple DOS "Dir" command which provide the lists the contents of the current directory.

Note that the individual commands or comments are separated by newlines which runs sequentially after double clicking on mybat.bat batch file.

Post comment
Thanks for your comment.!
Write a comment(Click here) ...

What is DOS?

DOS is an abbreviation for Disk Operating System and refers to the PC operating system. This operating system works as a medium between user and computer system, and between hardware and software too.

It is a character based, single user, single tasking, standalone operating system.

It can perform following task-
1) Management of Hardware and control devices such as keyboard, mouse, monitor, printer and scanner.
2) File system management for managing files and directories.
3) Memory management (storage device) and allocation of memory to various programs.
4) Management of the programs (kernel, UI and API) and their execution.

Many DOS options and / or enhancements are available, including MS-DOS (Microsoft Disk Operating System), FreeDOS and DR-DOS.

What is the DOS commands and explain the internal and external commands?

DOS commands are small programs and instructions that are made to perform a particular task. Every DOS command works differently. It is difficult to work on the computer without these commands. In DOS, there are many types of commands and they are classified into two types -

(1) Internal Commands
(2) External Commands

Internal Commands : These commands enter into computer memory during computer booting and are part of shell. There is no external file in the computer to read internal command.These commands are not in the form of any files, therefore neither they can be viewed nor can be edited or detected.
For example most commonly used internal commands : DIR, MD, CD, TIME, DATE, COPY, COPY CON, TYPE etc.

External Commands : These are commands that are not in-built in DOS and are not part of shell, they are only loaded in memory when they are invoked. These commands are present in the form of files and mostly are in exe, bat and com extensions ,therefore they can be viewed, copied, changed or deleted.
For example most commonly used external commands : XCOPY, FORMAT, COPY, PRINT, SYS, EDIT, TREE, SORT, PROMPT etc.

Describe the 10 DOS commands?

The 10 DOS command are-

1) CD/CHDIR (Change Directory) command is used to displays or change directories in DOS. CHDIR is the alternative name of CD command.
cd ..
cd c:windows

2) CLS (CLRSCR) command is used to clear the contents of the terminal screen or console.

3) COPY command is used to copy complete file from one location to another. It is also used to make copies of existing files.
copy test.bat c:windows
copy *.txt c:

4) DATE command is used to display the system date and prompts the user to enter a new date.
date /t

5) DEL (ERASE) command is used to permanently delete one or more files from the computer.
del test.txt
del *.txt
del *

6) DIR The dir command provides a list of available files in the current and or parent directory.
dir /p
dir /a
dir d*

7) EDIT is a full-screen text editor, which is used to view, create and modify text files.
edit myfile.txt

8) HELP command provides help about DOS commands.
help dir
help date
date /?

9) MOVE command is used to move one or more files or directories from one location to another. It also used to renames the files or directories.
move test.txt d:win
move d* d:win
move test.txt d: ewtest.txt

10) REN command is used to rename files and directories from the original name to a new name. unlike the move command, this command can not be used to rename subdirectories, or rename files across drives and can not specify a new drive or path for the destination of the renamed file.
ren *.txt *.doc
ren test.txt newtest.txt

Tell about networking related DOS commands?

ARP command is used to display and modify the Address Resolution Protocol(ARP) cache, which is a simple mapping of IP addresses to MAC addresses.
ARP is also useful when diagnosing duplicate IP assignment problems.
arp -a

FINGER command allows you to view information about users logged onto a remote computer, that may include their email address, full name, when last time user logged in and read their e-mail etc.
finger -l user@localhost

HOSTNAME command displays the name of the current host.

IPCONFIG command allow you to configure network interfaces and view information about them.This command can be used to verify a network connection as well as to verify your network settings.
ipconfig /all

PATHPING command utility enables a user to find network latency and network loss. Also that provides useful information about network latency and network loss at intermediate hops between a source address and a destination address.

PING command is one of the most commonly used and known command. It allows the user to ping another IP address or computer/host name. It can help to determine whether the network is able to communicate with the network or not.
ping -a

NBTSTAT command displays protocol statistics and current TCP/IP connections.
nbtstat -a

NET command is used to manage, set, view and determine network settings.
net view
net config

NETSTAT command is used to display the TCP/IP network protocol statistics and information.
netstat -a

NSLOOKUP command enables a user to look up an IP address of a domain or host on the network.

ROUTE command enables to view and modify the IP route table of the computer.
route print

TRACERT / TRACEROUTE command helps determine network related issues or slowdowns. It is similar to ping command but can provides details of how a network packet travels and whether it may fail or slow down. It can help to determine the computer, router, switch or other network device which probably causes your network issues.
tracert -d

How to run a Batch File?

A batch file can be run in two ways-

By command prompt as command
Double-clicking on the batch file

What is the difference between copy and copy con in DOS?

Copy is used to make a copy of a file. With this command, we can copy or append files with the same name or a new name in the current directory or any other location.
copy a.txt b.txt
copy a.txt c.txt
copy a.txt+b.txt c.txt
copy c.txt d:

Copy con is also called copy console, it is used to write file. We can not use copy con to edit the file. After write in the file, CTRL Z is required to save and exit .
copy con do.bat

@echo off
echo This batch file does absolutly
echo nothing but print this line.

CTRL Z ends the "writing" of the file.

What is chkdsk command?

Chkdsk is an abbreviation for check disk, used to check the status of the file system.

It scans the disk drive and helps in detecting error, repair and retrieval of data from bad sectors.

chkdsk d: / r
chkdsk d: / f
chkdsk *. *

What is AUTOEXEC.BAT file?

Autoexec.bat (Automatic execute batch) is a special plain-text batch file that is executed after system boot.
with this help, we can run commands, programs and batch files automatically at the time of startup or booting of the system, by adding them to this file.

Which is wild card character in DOS?

Wildcards are special characters and symbols that represent one or more characters. Commonly used wildcards are asterisk (*) and question mark (?).

An asterisk (*) is represents one or more characters, and a question mark (?) is represents a single character.

What is the xcopy command in dos?

The XCOPY command is used to copy one or more files and directories, including subdirectories from one location to another location.

xcopy c: est d: est /i
xcopy c: est d:


Config.sys is a configuration file and it is executed during system boot.

It contains commands and instructions to load device drivers, lastdrive, shell, devicehigh, buffers etc. It also used to load programs in memory to manage memory,hardware, keyboard, mouse, printer, and other peripherals.

Config.sys is editable text file and it can be edit in any text-editing program.

After executing the command of the config.sys file, the autoexec.bat file is executed.

How we can create a directory in DOS?

MD or mkdir MS-DOS command can use to create a directory

MKDIR dirname
MD dirname
md d:dirname

Explain the use of help DOS Command?

The help command provides more detailed information about other commands.

HELP [command]
Help dir
Help time

What is the full form of DOS?

The full form of DOS is Disk Operating System. This operating system works as a medium between user and computer system, and between hardware and software too.

Latest Updates

Indian Geography

What is the approximate distance between earth and the moon?

Indian History

In which year was the battle of ‘Koregaon Bhima’ fought?

The approach that is very useful in organizing the content in history is.

General Knowledge of India

NITI Aayog stands for _____.

General Knowledge of MP

India’s first Ramayan art museum was established at?

Errors Identification

Read the sentence carefully and choose the option that has an error in it:
The management’s trusted employee was suspected of stealing large sum of money.

Read the sentence carefully and choose the option that has an error in it:
The teacher asked the child to repeat again because he spoke feebly.

Fill in the blank

Fill in the blank with the most appropriate preposition in the given sentence.
Let’s sit _________ the shade of this beautiful tree.

Choose the most appropriate determiner for the given sentence.
________of what he said was very sensible.


Choose the option that substitutes the given phrase appropriately.
A work of art made by carving

Correct sentence

Choose the option that best transforms the sentence into its Indirect form:
‘What country do you come from?’ said the police officer.

Alternative Phrase

Choose the option that best explains the highlighted expression:
All human beings have feet of clay.

Fill in the blank

Choose an appropriate modal for the given sentence:
My doctor said that I_____ stop smoking as one of my lungs got infected.

Choose the appropriate prepositions for the given sentence:
My parents have been married ________ forty-nine years, but you can still see the love ________ their eyes.

Choose the appropriate conjunction for the given sentence:
______ it rains, the college will declare the holiday.


Choose the appropriate antonym for the highlighted word in the given sentence.
The family protracted their visit by several days.


Choose the appropriate tenses to fill in the blanks in the given sentence:
Please _________ a noise. Ritu __________ to sleep.


Choose the appropriate synonym for the highlighted word in the given sentence.
Does he really expect us to believe such a flimsy excuse?

Latest Job Notifications

Jobs in Bihar

बिहार तकनीकी सेवा आयोग / Bihar Technical Service Commission (BTSC) - 12771 पद - 01/09/2022 अंतिम तिथि

Jobs in Rajasthan

राजस्थान उच्च न्यायालय / Rajasthan High Court - 2756 पद - 22/09/2022 अंतिम तिथि

Jobs in Uttar Pradesh

उत्तर प्रदेश पावर कॉर्पोरेशन लिमिटेड / Uttar Pradesh Power Corporation Limited - 1033 पद - 12/09/2022 अंतिम तिथि

Jobs in Tamil Nadu

तमिलनाडु चिकित्सा सेवा भर्ती बोर्ड / Tamil Nadu Medical Services Recruitment Board (MRB) - 889 पद - 30/08/2022 अंतिम तिथि

Jobs in Andhra Pradesh

आंध्र प्रदेश स्वास्थ्य, चिकित्सा और परिवार कल्याण विभाग / Andhra Pradesh Health, Medical and Family Welfare Department - 1681 पद - 22/08/2022 अंतिम तिथि

SSC Recruitment

कर्मचारी चयन आयोग (एसएससी) Staff Selection Commission (SSC) - 4300 पद - 30/08/2022 अंतिम तिथि - CPO Recruitment

Banking Jobs

बैंकिंग कार्मिक चयन संस्थान Institute of Banking Personnel Selection(IBPS) - 6432 पद - 22/08/2022 अंतिम तिथि

बैंकिंग कार्मिक चयन संस्थान Institute of Banking Personnel Selection(IBPS) - 7855 पद - 29/07/2022 अंतिम तिथि

SSC Recruitment

कर्मचारी चयन आयोग (एसएससी) Staff Selection Commission (SSC) - 1411 पद - 29/07/2022 अंतिम तिथि

Jobs in Rajasthan

राजस्थान अधीनस्थ और मंत्रिस्तरीय सेवा चयन बोर्ड Rajasthan Subordinate and Ministerial Services Selection Board (RSMSSB) - 5546 पद - 22-Jul-2022 अंतिम तिथि