Examveda

Which command is used to delete all the files extension .txt on the current drive and directory?

A. Del .txt

B. Erase .txt

C. Del *.txt

D. Del *.*/p

Answer: Option C

Solution (By Examveda Team)

Del *.txt is the command used in DOS to delete all files with the extension .txt from the current drive and directory.

The del command in DOS is used to delete files.
*.txt specifies that all files with the .txt extension should be deleted.
When you execute del *.txt at the command prompt, DOS will delete all files ending with .txt in the current directory.

Del .txt is not the correct syntax for deleting files with a specific extension; it would attempt to delete a file named ".txt".

Erase .txt is not a valid command in DOS for deleting files; the correct command is del instead of erase for file deletion.

Del . /p is incorrect because the /p switch is not used for deleting files. It typically stands for prompting before deleting, but it's not part of the standard del command syntax.

Therefore, the correct answer is Option C: Del *.txt.

This Question Belongs to Computer Science >> Disk Operating System (DOS)

Join The Discussion

Related Questions on Disk Operating System (DOS)