question

FredZuckerman-7337 avatar image
0 Votes"
FredZuckerman-7337 asked GaryNebbett commented

Copying ZIP files

I issue the DOS cmd "Copy C:\BackUp\ *1.zip C:\Temp" in a batch file.
It is supposed to copy all of the .zip files that end with a "1".
But it also copies a file named Music5.zip and does NOT copy Music4.zip
So is it looking "inside" the zip files for file names ending in "1"?
Thanks
== I may not have the appropriate tags, sorry ==

windows-api
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Is “Music5” the real name of your problematic file?

0 Votes 0 ·

Yes, Music5.zip. I don't know why it was copied since it doesn't end with 1,

0 Votes 0 ·
Viorel-1 avatar image Viorel-1 FredZuckerman-7337 ·

Make sure that the name does not have leading and trailing spaces or other special characters. Also check the extension.

0 Votes 0 ·
Show more comments

I'm sorry I can't reproduce the problem, could you provide more details about the file to help us understand the problem?

0 Votes 0 ·

Thank you SongZhu-MSFT,
See below for the fix.
Fred

0 Votes 0 ·

1 Answer

GaryNebbett avatar image
2 Votes"
GaryNebbett answered GaryNebbett commented

Hello anonymous userZuckerman-7337,

Can you try issuing the command "dir /x Music5.zip" (assuming that Music5.zip is in the current directory)? The "/x" options shows the "8.3" name of the file (if present). There is no reason why "Music5.zip" should have an 8.3 name (since it is already in that format), but it would be good to check. The base part of the automatically generated 8.3 names often end in something like "~1" (the final letter is just chosen to make the chosen name unique among existing files in the directory, so ~2, ~3, etc. can also be observed).

Gary

· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Ooh, good point. I'll try that & post back. Tks

0 Votes 0 ·

Thank You GaryNebbett!!
That was the problem.
The file was previously named ThumbMusic5.zip and had 8.3 file name of ThumbM~1.zip
I deleted the file and re-created it as Music5.zip.
Then tried Dir /x and confirmed the 8.3 file name.
Batch file works great now,
Thank you!
Fred

0 Votes 0 ·
Viorel-1 avatar image Viorel-1 FredZuckerman-7337 ·

So it was not called Music5.zip?


0 Votes 0 ·

Not originally.
Originally it was ThumbMusic5.zip

0 Votes 0 ·
Show more comments