1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Paths in ZIP

Discussion in 'Support' started by TimButterfield, Dec 30, 2010.

  1. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    414
    Likes Received:
    2
    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
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,029
    Likes Received:
    84
    WAD. Specifying the same filename twice isn't equivalent to implying a /R for the second file.

    No.

    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.)
     

Share This Page