Copying text files from a floppy — correct DOS syntax: Which command copies all files with the .TXT extension from drive A to the current directory on the currently logged drive?
-
ACOPY A:.TXT
-
BCOPY .TXT A:
-
CCOPY .TXT C:
-
DCOPY .TXT ALL.TXT
-
ENone of the above
Answer
Correct Answer: COPY A:.TXT
Explanation
Introduction / Context:Copying groups of files in DOS relies on wildcard patterns and correct source/destination ordering. A common task is moving all text files from a floppy disk (drive A) to the current working directory on the hard disk.
Given Data / Assumptions:
- Source is drive A (floppy).
- We want to copy every file with extension TXT.
- Destination is the current directory (no explicit path provided).
Concept / Approach:
DOS COPY syntax is COPY source destination. When the destination is omitted, COPY assumes the current directory on the current drive. To match all text files on A:, combine the drive specifier and wildcard: A:.TXT. Case is not significant in DOS file systems.
Step-by-Step Solution:
Specify the correct source: A:.TXT to target all text files on the floppy.Provide destination: omit to default to current directory, or explicitly use..Run the command: COPY A:.TXTVerify copies with DIR to confirm successful transfer.Verification / Alternative check:
Test by creating sample files on A: and executing the command; observe that all matching files appear in the current directory. DOS usage guides show identical syntax examples.
Why Other Options Are Wrong:
- COPY *.TXT A:: reverses source and destination; would copy from current directory to A: instead.
- COPY .TXT C:: copies to C:, not to the current directory unless that is C: and current path matches; also source would be current drive, not A:.
- COPY .TXT ALL.TXT: concatenates or overwrites into a single file named ALL.TXT, not a multi-file copy from A:.
- None of the above: incorrect because COPY A:.TXT is valid.
Common Pitfalls:
Leaving out the drive specifier (which changes the source); forgetting wildcard behavior; unintentionally overwriting files with the same names in the destination.
Final Answer:
COPY A:.TXT