MS-DOS & PC-DOS XCOPY unset read-only, system, and hidden attributes, however, XCOPY 1.4 and the latest commit here doesn't.
I propose to make the default behavior to be compatible with genuine DOSs.
The following link is a proposed fix that includes:
- Unset attributes of the destination file except Archive attribute as default, following the genuine DOS behavior.
- Added /K option to copy all attributes, which is the current FreeDOS behavior.
https://github.com/joncampbell123/dosbox-x/tree/master/src/builtin/xcopy
Edit: fixed broken link