ExamVeda
Login
Home
Disk Operating System (DOS)
?

While working with MS-DOS, which command is used to rename a file named file1.doc to file2.doc from a different directory called dir1?

Answer & Solution
Correct Answer: Option D
To rename a file named file1.doc to file2.doc from a different directory dir1 in MS-DOS, you use the ren (short for rename) command. Here’s the explanation for each option:
Option A: Ren2.doc \dir\file1.doc is incorrect syntax. The correct format for renaming involves specifying the full path of the original file followed by the new filename.
Option B: Ren file1.doc file2.doc renames file1.doc to file2.doc in the current directory, not in a different directory.
Option C: Ren .doc\dir\.doc is incorrect syntax. It does not specify the correct path or filenames for renaming.
Option D: Ren \dir1\file1.doc file2.doc is the correct command to rename file1.doc located in directory dir1 to file2.doc.

Therefore, Option D is the correct command to rename a file from a different directory in MS-DOS.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.