- May
- 239
- 2
zip/unzip issues in v12
TCC 12,00,35 Windows Vista [Version 6,0,6002]
Seems to be two problems, but it might be me misunderstanding how to use UNZIP.
First, unzip does not ask before overwriting files, which it should according to the documentation. Second, UNZIP /D does not restore the directory structure correctly. Sub-directories are not unzipped even if the output says so).
If you specify /D then UNZIP does ask before overwriting first, but not when run with only the zipfile as argument.
A question as well, is there some way to test the CRC of the generated zip-file (equivalent of "7z t" for example)?
Example test run:
</dir></dir>
TCC 12,00,35 Windows Vista [Version 6,0,6002]
Seems to be two problems, but it might be me misunderstanding how to use UNZIP.
First, unzip does not ask before overwriting files, which it should according to the documentation. Second, UNZIP /D does not restore the directory structure correctly. Sub-directories are not unzipped even if the output says so).
If you specify /D then UNZIP does ask before overwriting first, but not when run with only the zipfile as argument.
A question as well, is there some way to test the CRC of the generated zip-file (equivalent of "7z t" for example)?
Example test run:
Code:
20:41 (2010-11-13) C:\Users\niklas\test>dir /s /b
C:\Users\niklas\test\aa
C:\Users\niklas\test\aa\bb
C:\Users\niklas\test\aa\f1
C:\Users\niklas\test\aa\f2
C:\Users\niklas\test\aa\bb\f3
C:\Users\niklas\test\aa\bb\f4
20:41 (2010-11-13) C:\Users\niklas\test>zip /r testzip.zip aa
<= C:\Users\niklas\test\aa\*
20:41 (2010-11-13) C:\Users\niklas\test>zip /v testzip.zip
2010-11-13 20:41 1 100% aa\
2010-11-13 20:41 1 100% aa\bb\
2010-11-13 20:41 13 -15% aa\bb\f3
2010-11-13 20:41 13 -15% aa\bb\f4
2010-11-13 20:41 13 -15% aa\f1
2010-11-13 20:41 13 -15% aa\f2
20:41 (2010-11-13) C:\Users\niklas\test>unzip testzip.zip
=>
=>
=> C:\Users\niklas\test\f3
=> C:\Users\niklas\test\f4
=> C:\Users\niklas\test\f1
=> C:\Users\niklas\test\f2
20:42 (2010-11-13) C:\Users\niklas\test>unzip /d testzip.zip
=> C:\Users\niklas\test\aa\
=> C:\Users\niklas\test\aa\bb\
C:\Users\niklas\test\aa\bb\f3 (Replace) (Y/N/A/R)? Y
=> C:\Users\niklas\test\aa\bb\f3
C:\Users\niklas\test\aa\bb\f4 (Replace) (Y/N/A/R)? Y
=> C:\Users\niklas\test\aa\bb\f4
C:\Users\niklas\test\aa\f1 (Replace) (Y/N/A/R)? Y
=> C:\Users\niklas\test\aa\f1
C:\Users\niklas\test\aa\f2 (Replace) (Y/N/A/R)? Y
=> C:\Users\niklas\test\aa\f2
Indexing C:\Users\niklas\test
20:42 (2010-11-13) C:\Users\niklas\test>deltree aa
Delete C:\Users\niklas\test\aa\f1 (Y/N/A/R)? R
Deleting C:\Users\niklas\test\aa\f2
Deleting C:\Users\niklas\test\aa\bb\f3
Deleting C:\Users\niklas\test\aa\bb\f4
Removing C:\Users\niklas\test\aa\bb\
Removing C:\Users\niklas\test\aa\
4 files deleted 4 096 bytes freed
20:42 (2010-11-13) C:\Users\niklas\test>unzip /d testzip.zip
=> C:\Users\niklas\test\aa\
=> C:\Users\niklas\test\aa\bb\
=> C:\Users\niklas\test\aa\bb\f3
=> C:\Users\niklas\test\aa\bb\f4
=> C:\Users\niklas\test\aa\f1
=> C:\Users\niklas\test\aa\f2
Indexing C:\Users\niklas\test
20:42 (2010-11-13) C:\Users\niklas\test>dir aa
Volume in drive C is unlabeled Serial number is 28b9:6305
Directory of C:\Users\niklas\test\aa\*
13.11.2010 20:42 <dir> .
13.11.2010 20:42 <dir> ..
13.11.2010 20:41 13 f1
13.11.2010 20:41 13 f2
26 bytes in 2 files and 2 dirs 8 192 bytes allocated
176 564 928 512 bytes free
20:43 (2010-11-13) C:\Users\niklas\test>