copy create's an almost empty (1K) file when a wildcard (*?) is used in the source & an output name is specified.
copy /D /V *?ample.png %homepath%/example.png
it works for some file types (.txt .rtf)
copy /D /V *?ample.txt %TEMP%\example.txt
interestingly wildcards in both the source & the destination fixes this,
copy "*xample.pdf" "%TEMP%/*xample.pdf"
but messes up the file name, it be comes: le.pdfxample.pdf
is this a Bug or bad syntax? i'm stumped.
i'm on Windows 7 x86_64
related questions
Using wildard with DOS COPY command corrupts destination file
How do I copy a file using a wildcard in Windows without appending?
*means 0 or more chars;*?means one or more chars, which is a significant and useful difference. – Aganju Jun 12 '17 at 05:13Copyshould not assume it's "appending" files in this case, it should check & if multiple Binary files are given, exit with an error: Cannot concatenated Binary files.Microsoft, so misguided
– Vencen Jun 13 '17 at 01:04