By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WAD Another weird copy command errror...

And I don't see how this can be attributed to the Windows API (although its source is a complete mystery to me). As usual in this situation, the easiest and best way to demonstrate the problem is with a TCC session log:
  Fri  Mar 22, 2013  7:44:45p
[F:\]md Multi-Media /D
[E:\]cd Multi-Media
[E:\Multi-Media]copy * F: /A: /B /D /F /H /J /K /Njt /S /T /X * F:
TCC: (Sys) There are no more files.
TCC: (Sys) There are no more files.
TCC: (Sys) There are no more files.
"E:\Multi-Media\Music\Sources\Amazon\Celtic Thunder\*"
... Many more lines like the above and below ...
TCC: (Sys) There are no more files.
"E:\Multi-Media\Music\Sources\Amazon\Jay Farrar and Benjamin Gibbard\*"
TCC: (Sys) There are no more files.
"E:\Multi-Media\Music\Sources\Yahoo!\Uncle Kracker\*"
TCC: (Sys) There are no more files.
F:\Multi-Media\Music\Music File Directory List.txt => F:\Multi-Media\Music\Music Fi
le Directory List.txt (Replace) (Y/N/A/R)?

Note that the complaint is that it can't copy files to themselves.

And I have a program that can compare two directory trees, and not all directories were copied.
I see many option switches after the specification of source and target. Unlike most commands, where all options must precede other (data specification) command parameters, copy allows interspersing /A (ASCII) and /B (binary) options between source files, though I do not recall a need to do so in the last 15 years. For any other option in copy, and for any option in any other command, the only place to specify them with the legitimate expectation the parser will interpret them correctly is before command data. Although in most cases the parser can DWIM, that is not a dependable expectation. Another peculiarity of copy (shared with move) that one may specify multiple sources, but only a single destination. Your command is in the form
copy source1 source2 OPTIONS source3 destination
where source1 and source3 are "*", source2 and destination are "F:" - clearly source2 and destination are the same...

BTW, your example shows another command with incorrect syntax (though the parser was able to handle it properly):
md Multi-Media /D
Thank you, Steve. If just falls into the category that I'm half blind (and kind of stupid sometimes ;)) I will also note that some of those switches were placed there in the broad category of "it can't hurt". Sounds like I wasn't completely correct in that presumption.

Similar threads