Which MS-DOS XCOPY syntax copies only files with a timestamp on or after the specified date (that is, modified since a given date)?
-
AXCOPY /D:date
-
BCOPY /D:date
-
CCOPY /M
-
DXCOPY /V
-
ENone of the above
Answer
Correct Answer: XCOPY /D:date
Explanation
Introduction / Context:Incremental file maintenance often requires copying only files that have changed since a particular date. MS-DOS provides an extended copy command that supports date-based filtering to streamline backups and deployments without redundantly copying unchanged files.
Given Data / Assumptions:
- XCOPY is available (commonly in C:\DOS).
- User supplies a date parameter appropriate to the DOS locale (for example, mm-dd-yy).
- Goal: Copy files modified on or after the specified date.
Concept / Approach:The XCOPY /D:date switch selects files whose last-write time is on or after the provided date. XCOPY then copies only those qualifying files to the target. COPY does not support /D:date. Other switches like /V verify copies but do not filter by date. COPY /M is not a DOS standard for date-based selection.
Step-by-Step Solution:
1) Choose a cutoff date, for example, 06-01-25.2) Run: XCOPY C:\SRC\. D:\DEST\ /D:06-01-253) XCOPY scans timestamps and selects only newer or same-day files.4) Review summary to confirm the number of files copied.Verification / Alternative check:Re-run the same command immediately; with no newer files, XCOPY should report zero files copied, confirming date filtering.
Why Other Options Are Wrong:
- COPY /D:date and COPY /M: COPY lacks these date-based semantics.
- XCOPY /V: Verifies data after copy; does not filter by date.
- None of the above: Incorrect since XCOPY /D:date is valid.
Common Pitfalls:Using the wrong date format for the configured locale, leading to unintended selections, or forgetting to include subdirectories with XCOPY switches like /S if needed.
Final Answer:XCOPY /D:date