While working with MS-DOS which command is used to change the extension of all filenames ending with .txt to .doc?
A. Ren *.doc *.txt
B. Ren *.txt *.doc
C. Ren file.doc file.txt
D. Ren a: *.doc *.txt
Answer: Option B
Solution (By Examveda Team)
Changing file extensions in MS-DOS can be done using the ren (rename) command. Here’s how each option works:Option A: Ren *.doc *.txt would attempt to rename files with .doc extension to .txt, which is the reverse of what is required.
Option B: Ren *.txt *.doc correctly renames all files with .txt extension to .doc.
Option C: Ren file.doc file.txt attempts to rename a specific file from file.doc to file.txt, not suitable for renaming all files.
Option D: Ren a: *.doc *.txt tries to rename files with .doc extension on drive a: to .txt, but the syntax is incorrect for this operation.
Therefore, Option B is the correct command to change the extension of all filenames ending with .txt to .doc in MS-DOS.

Join The Discussion