Welcome!

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

SignUp Now!

Paths in ZIP

Given a list file, files.lst, of:

file.txt
sub\file.txt

and the command:

zip /a files.zip @file.lst

I would expect the resulting zip to have two files, one in a subfolder path. Instead, what happens is:

<= file.txt
<= sub\file.txt
TCC: Error in archive D:\temp\files.zip :
File already exists in the archive. "sub\file.txt"

Shouldn't this be equivalent to the infozip command:
zip.exe -@ files.zip < files.lst

That does create a zip with two files, one in a path.

Or, is there another way to do this with the internal ZIP so that paths are created in the ZIP and duplicate names in subfolders do not cause errors?

I'm using a file list instead of /R because I do not want to automatically include nested sub folders with names like Debug and Release, which may exist under the current folder or under some nested folder.

TCC 12.00.42 Win XP
 
Given a list file, files.lst, of:

file.txt
sub\file.txt

and the command:

zip /a files.zip @file.lst

I would expect the resulting zip to have two files, one in a subfolder path. Instead, what happens is:

<= file.txt
<= sub\file.txt
TCC: Error in archive D:\temp\files.zip :
File already exists in the archive. "sub\file.txt"

WAD. Specifying the same filename twice isn't equivalent to implying a /R for the second file.

Shouldn't this be equivalent to the infozip command:
zip.exe -@ files.zip < files.lst

No.

Or, is there another way to do this with the internal ZIP so that paths are created in the ZIP and duplicate names in subfolders do not cause errors?

No.

Use InfoZip -- the internal ZIP isn't intended to emulate every obscure option of every ZIP / UNZIP app out there. (Besides then rendering it incompatible with every *other* ZIP / UNZIP app, the size & development time costs aren't justifiable.)
 

Similar threads

Back
Top