?
Which command is used to delete all the files extension .txt on the current drive and directory?
Answer & Solution
Correct Answer:
Option
C
Del *.txt is the command used in DOS to delete all files with the extension .txt from the current drive and directory.
The
When you execute
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 . /p is incorrect because the
Therefore, the correct answer is Option C: Del *.txt.
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.
Join the Discussion
Login to post a comment or share your explanation.
Login