Vidyalelo
Computer Science · Q42

Disk Operating System (DOS)

Engineering and GATE · Computer Science · question 42

Q42

Which command be used to ask you to confirm that you want to delete the directory?

A.
Deltree
B.
Deltree/f
C.
Del *.*/p
Answer
D.
Erase *.*

Answer: Option C

Solution

Answer: Option C
Solution:
In Disk Operating System (DOS), the command used to ask for confirmation before deleting files is Option C: Del ./p. The "/p" switch prompts the user to confirm each deletion before proceeding, ensuring that files are not deleted accidentally.

Option A, "Deltree," deletes directories and their contents recursively but does not prompt for confirmation in standard DOS commands.
Option B, "Deltree /f," is not a valid switch for prompting confirmation in DOS commands.
Option D, "Erase .," is used to delete all files without prompting for confirmation.

Therefore, the correct answer is Option C: Del ./p.