duplicate filename in different subdirectorie

Janvl
2009-01-14
2012-12-07
  • Janvl
    Janvl
    2009-01-14

    Hello,

    if I have the same filename in two different directories and make a compressed backup with the commandline-7zip. It does not do this backup and notifies it as an error.

    Error:
    Duplicate filename:
    filename.txt
    filename.txt

    These are in different subdirectories.
    The command was:
    7za.exe a backup.7z @listfile.txt

    the listfile looks like this:
    c:\testdir-2a\*
    c:\testdir-2b\*

    The version is 4.64

    Question, is there a switch to set to avoid this?

    Thanks in advance, 7zip is really super.

    Janvl

     
    • fernando
      fernando
      2009-01-14

      make the listfile looks like this:
      c:\testdir-2a\ c:\testdir-2b\

       
    • Janvl
      Janvl
      2009-01-15

      Thanks,

      I tried it and it worked but using -r will make it hang in "scanning".
      This will help me solve the problem I had,  so

      many thanks,

      Janvl

       
    • joeharker
      joeharker
      2009-01-16

      i am experiencing the same bug when i use a detailed list file on version 4.64
      my command line looks like this:

      "C:\Program Files\7-Zip\7z" a -tzip archive.zip @listfile.txt

      my list file looks like this:

      C:\Joe\temp\name.txt
      C:\Joe\temp\dir\name.txt

      i get the following error:

      Error:
      Duplicate filename:
      name.txt
      name.txt

       
      • fernando
        fernando
        2009-01-16

        1. change content of listfile; remove [drive]:\ 2. execute 7z command from parent directory of subject files

        $ :: here is content of listfile.txt
        $ cat listfile.txt
        Joe\temp\name.txt
        Joe\temp\dir\name.txt

        $ :: change to parent directory of subject files
        $ cd /d c:

        $ :: here is content of "Joe" directory on c:
        $ tree /a /f Joe
        Folder PATH listing for volume OS
        Volume serial number is 1234-ABCD
        C:\JOE
        \---temp
            |   name.txt
            |
            \---dir
                    name.txt

        $ :: execute 7z command from parent dir of subject files
        $ ::  give full path to listfile.txt if needed
        $ 7z a -tzip archive @t:\test\listfile.txt

        7-Zip 4.64  Copyright (c) 1999-2009 Igor Pavlov  2009-01-03
        Scanning

        Creating archive archive.zip

        Compressing  Joe\temp\dir\name.txt
        Compressing  Joe\temp\name.txt

        Everything is Ok

        $

         
    • joeharker
      joeharker
      2009-01-16

      i am experiencing the same bug when i use a detailed list file on version 4.64
      my command line looks like this:

      "C:\Program Files\7-Zip\7z" a -tzip archive.zip @listfile.txt

      my list file looks like this:

      C:\Joe\temp\name.txt
      C:\Joe\temp\dir\name.txt

      i get the following error:

      Error:
      Duplicate filename:
      name.txt
      name.txt

       
    • joeharker
      joeharker
      2009-01-16

      sorry about the repost (browser refresh)

       
    • joeharker
      joeharker
      2009-01-16

      sweet

      that totally worked!
      and your response time was incredible!

      thanks so much

       
  • JTech26
    JTech26
    2010-08-04

    I am also receiving a duplicate file error -

    Originally, an archive was created with these syntax parameters to archive my documents and settings folder each day and update any files that have changed to a slaved D drive:

    7z u -tzip D:\DocumentsAndSettings.zip "C:\Documents and Settings"

    The archive was created.  I then wanted to clean the archive file using an exclusion list of file types and directories.  This is the syntax I used:

    7z d D:\DocumentsAndSettings.zip -ir@C:\exclude\exclude.txt

    This was the contents of my exclusion list:

    "Documents and Settings\*\Local Settings\Temp\*"
    "Documents and Settings\*\Local Settings\Temporary Internet Files\*"
    *.bak
    *.tmp
    *.mp3
    *.wav
    *.mov
    *.avi
    *.mpg
    *.url

    After attempting to clean the archive file using my exclusion list, I get the duplicate file name error.  The error reports back with 2 file names with the same names and identical creation dates placed in the same directories in the archive file.  There is only 1 file on disk.  How did 7zip place identical files in the same directory?

    Any help would be greatly appreciated!

     
  • Keith Adams
    Keith Adams
    2011-10-26

    jtech26, thanks for the detailed response, but that's hardly very convenient. This is a bug with the @listfile option. Any zip should naturally be able to accomodate same-named files in different folders without you having to jump through hoops. This is a bug. I have the same problem, so I guess I have to try other software. Thanks, Keith

     

  • Anonymous
    2012-05-14

    I'm with Keith here. I tried to make an archive of a website & received this error. Pity… because 7z format has superior compression, yet the 7-Zip software used to compress is riddled with bugs like this, making it unusable and completely non-function in cases like this where two files *MUST* have the same name.

     
  • john lee
    john lee
    2012-05-14

    I agree - not having the ability to do this is pretty horrible. Try 7.25 alpha (see its release notes in this forum and discussion about it) which has the initial capability to handle this with an extra switch, or use freearc (arc), which has similar compression performance and doesn't have this stupid feature!  j 

     

  • Anonymous
    2012-07-16

    I've got the same problem, but my files are spread across multiple machines, so I don't have a driver to remove, I have many machine names.
    Do you have an ETA for a fix?
    Love 7zip - this is the only issue I have ever had