(cursory look, this isn't a full review yet) please add tests for these UC, covering single and multiple files copy (ie copy a a; copy a+b a; copy a+b b --- from a quick look in native, the three caseq have different behaviors) IIRC, in the third case using 'copy .. < NUL' forces the 'Y' case (using echo Y|copy... doesn't work in all locales) for COPY, it should be possible to fold the error path into the existing code instead of stuffing into a new block of codes a bunch of existing lines of code adding the same-file to the traces is useless IMO for XCOPY, stick to the existing style of the file (ie indentation is wrong)