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.
Related Questions on Disk Operating System (DOS)
In MS-Dos what command you will use to display system date?
A. Date command
B. Ver command
C. Disk command
D. Format command
While working with Ms-Dos which command transfers a specific file from one disk to another?
A. Copy
B. Diskcopy
C. Time
D. Rename
If you don't know the current time, which command will you use to display
A. Copy
B. Ver
C. Time
D. Format

Join The Discussion