ZIP /U a little screwy

May 20, 2008
11,405
99
Syracuse, NY, USA
In addition to what's below, Explorer shows the zipfile with 4tray64.dll having an older time and trying to drag it out of the Explorer window (say to the desktop) results in an error, 0x80004005 (unspecified).

Code:
l:\projects\4tray\release> dir /km 4tray.dll
2012-11-04  13:26          40,960  4Tray.dll
 
l:\projects\4tray\release> dir /km ..\x64\release\4tray64.dll
2012-11-04  13:26          46,080  4Tray64.dll
 
l:\projects\4tray\release> zip /u 4tray.zip 4Tray.dll ..\x64\Release\4Tray64.dll
 
<= L:\Projects\4Tray\x64\Release\4Tray64.dll
 
l:\projects\4tray\release> zip /c 4tray.zip
M
 
P
u
W
┼
0 L
o
T
t
ⁿ
TCC: Error in archive L:\Projects\4Tray\release\4tray.zip :
  Wrong local header signature. "4Tray64.dll"
 
May 20, 2008
11,405
99
Syracuse, NY, USA
And even after making a new (seemingly working) zipfile from scratch, ZIP /C screws up.
Code:
l:\projects\4tray\release> zip /c 4tray.zip
M
 
P
u
W
┼
0 L
o
T
t
ⁿ
M
♦
♣
]
╦
♀
H
L
n
(
C
 
 
l:\projects\4tray\release>
 

rconn

Administrator
Staff member
May 14, 2008
12,348
150
What do you think /C is going to do?

If you're trying to display the filenames, you should be using /V. /C dumps the physical contents of the zip file, not the names. (And with binary files, that'll be terminated at the first null character in the file.)
 
May 20, 2008
11,405
99
Syracuse, NY, USA
What do you think /C is going to do?

If you're trying to display the filenames, you should be using /V. /C dumps the physical contents of the zip file, not the names. (And with binary files, that'll be terminated at the first null character in the file.)
My mistake (for confusing "contents" with a listing). But my original report about ZIP /U still seems in order.
Code:
l:\projects\4tray\release> zip /v 4tray.zip
2012-11-04  22:37         40,960  51%  4Tray.dll
2012-11-04  13:26         46,080  53%  4Tray64.dll

l:\projects\4tray\release> touch ..\x64\Release\4Tray64.dll
2012-11-05 20:23:27.479  L:\Projects\4Tray\x64\Release\4Tray64.dll

l:\projects\4tray\release> zip /u 4tray.zip 4Tray.dll ..\x64\Release\4Tray64.dll

<= L:\Projects\4Tray\x64\Release\4Tray64.dll

l:\projects\4tray\release> zip /v 4tray.zip
2012-11-04  22:37         40,960  51%  4Tray.dll
2012-11-04  13:26         46,080  53%  4Tray64.dll

l:\projects\4tray\release>
Note how the archive's timestamp for 4tray64.dll was not updated. Also at this point, 4tray64.dll cannot be extracted with Explorer (error as described in my original post).
 
May 20, 2008
11,405
99
Syracuse, NY, USA
With build 44:
Code:
l:\projects\4tray\release> del 4tray.zip
Deleting L:\Projects\4Tray\release\4tray.zip
    1 file deleted            20,480 bytes freed
 
l:\projects\4tray\release> zip 4tray.zip 4Tray.dll ..\x64\Release\4Tray64.dll
<= L:\Projects\4Tray\release\4Tray.dll
<= L:\Projects\4Tray\x64\Release\4Tray64.dll
 
l:\projects\4tray\release> shellex 4tray.zip

At this point, in Explorer, I can drag either file out of the zip folder.

Code:
l:\projects\4tray\release> touch ..\x64\Release\4Tray64.dll
2012-11-05 23:10:58.201  L:\Projects\4Tray\x64\Release\4Tray64.dll
 
l:\projects\4tray\release> zip /u 4tray.zip 4Tray.dll ..\x64\Release\4Tray64.dll
 
<= L:\Projects\4Tray\x64\Release\4Tray64.dll
 
l:\projects\4tray\release> shellex 4tray.zip
 
l:\projects\4tray\release> ver
 
TCC  14.02.44  Windows 7 [Version 6.1.7601]
 
l:\projects\4tray\release> zip /v 4tray.zip
2012-11-04  22:37        40,960  51%  4Tray.dll
2012-11-05  23:05        46,080  53%  4Tray64.dll
 
l:\projects\4tray\release>

At this point I cannot drag 4tray64.dll out of the zip-folder. And it's timestamp (23:10, from TOUCH) was not changed in the zip file. The error message box says "An unexpected error is keeping you from copying the file. [...] Error 0x80004005: Unspecified error [...]".
 
May 20, 2008
11,405
99
Syracuse, NY, USA
And after all that (previous post), TCC itself says:
Code:
l:\projects\4tray\release> copy 4tray.zip v:\
L:\Projects\4Tray\release\4tray.zip => V:\4tray.zip
    1 file copied
 
l:\projects\4tray\release> v:\
 
v:\> which unzip
unzip is an internal command
 
v:\> unzip 4tray.zip
=> V:\4Tray.dll
TCC: Error in archive V:\4tray.zip :
  Wrong local header signature. "4Tray64.dll"
 
v:\>
 
May 20, 2008
11,405
99
Syracuse, NY, USA
Here's a simpler version, on another machine (with build 44). It doesn't seem to like the combination of "/U" and "..\...".

Code:
v:\test> zip ttt.zip ..\tictactoe.exe
<= V:\tictactoe.exe
 
v:\test> unzip ttt.zip
=> V:\test\tictactoe.exe
 
v:\test> del tictactoe.exe
Deleting V:\test\tictactoe.exe
    1 file deleted              8,192 bytes freed
 
v:\test> touch ..\tictactoe.exe
11/05/2012 23:47:54.013  V:\tictactoe.exe
 
v:\test> zip /u ttt.zip ..\tictactoe.exe
<= V:\tictactoe.exe
 
v:\test> unzip ttt.zip
TCC: Error in archive V:\test\ttt.zip :
  Wrong local header signature. "tictactoe.exe"
 
v:\test>
 
May 20, 2008
11,405
99
Syracuse, NY, USA
Actually, it doesn't have anything to do with the "..".
Code:
v:\test> zip ttt.zip v:\tictactoe.exe
<= V:\tictactoe.exe
 
v:\test> unzip ttt.zip
=> V:\test\tictactoe.exe
 
v:\test> del tictactoe.exe
Deleting V:\test\tictactoe.exe
    1 file deleted              8,192 bytes freed
 
v:\test> touch v:\tictactoe.exe
11/06/2012 11:12:14.108  V:\tictactoe.exe
 
v:\test> zip /u ttt.zip v:\tictactoe.exe
<= V:\tictactoe.exe
 
v:\test> unzip ttt.zip
TCC: Error in archive V:\test\ttt.zip :
  Wrong local header signature. "tictactoe.exe"
 
v:\test>
 
Similar threads
Thread starter Title Forum Replies Date
C Documentation Help nix ZIP /M Support 0
Chen Touboul Failed to ZIP Support 9
I zip /M fails to delete file after adding to zip file Support 2
Joe Caverly 7zip command links to zip help Support 0
T How to? ZIP/7ZIP @listfile with folders Support 2
Joe Caverly UNZIPping older .ZIP files Support 3
M Is the sdk.zip file corrupted? Support 8
C ZIP/U compares wrong timestamp Support 13
C ZIP Support 0
R Fixed Internal ZIP command fails to process multiple files Support 3
vefatica ZIP? Support 13
D Zip errors on large files. Support 4
C ZIP .vs. PkZip Support 21
mikea Questions re: Internal ZIP command Support 5
S How to? Set the timestamp of ZIP command built archive to match latest member Support 8
C ZIP behavior Support 5
Frank ZIP: howto store directory in the zip-file Support 20
J zip wrong central directory signature Support 12
C Vince - your FTP'ed jpsupport.zip's Support 1
ehab aboudaya WAD starting tcmd.exe with dir that has Boost C++ Libraries zip file delays Support 2
T Paths in ZIP Support 1
fpefpe zip command file size Support 1
T Zip and reparse points Support 7
J ZIP Help - minor quibble Support 0
H V12 Zip encryption Support 1
S ZIP support in next version? Support 1
vefatica ZIP's informative output Support 1
D Zip /q Support 0
H ZIP/UNZIP issues Support 4
S Version 11 ZIP /V - Permission denied on Network drive Support 2
Joe Caverly ZIP, UNZIP v11 Beta Support 6
Peter Murschall A little problem with LEAVE and COMMENT Support 5
MickeyF A little help with @REREPLACE Support 6
M Little bug, big consequences .. Support 6
M An oddity that's a little bit scary... Support 6
R How to? i need a little help Support 3
M A little bit of strangeness with @Char... Support 3
M A new problem that has actually got me a little panicky... Support 10
L A little startup help from an old CLI guy please. Support 14
Peter Bratton Another little bug? Support 1
A TCMD 11 little bugs Support 4
H I need a little help. Support 4
C Some little observations Support 16
vefatica Why are these so screwy? Support 6
vefatica WAD Vertical scrolling screwy in TC Support 1

Similar threads