• 0

[MS-DOS batch] 7zip Duplicate file error in different directories


Question

Hi,

I need to use some ms-dos batch files to run 7zip for making compressed backup. However, it treats it as duplicate file name error when there are files with same name but in different directories :cry: .

Error:

Duplicate filename:

abc.txt

abc.txt

The list file looks like:

d:\test\backup\abc.txt

d:\test\backup\sub\abc.txt

The batch file looks like:

dir /B /S d:\test\*.* >> fileList.lst

"c:\programe files\7-zip\7z" a -tzip test.zip @fileList.lst

Any idea to solve the problem?

Thanks,

petal

4 answers to this question

Recommended Posts

  • 0

well.. what you are doing there is just listing out the file names and adding them to a zip file..

you need to zip the root directory instead of adding individual files

i don't have 7zip to hand but perhaps try something like..

"c:\programe files\7-zip\7z" a -tzip test.zip "d:\test"

not 100% sure though ;)

  • 0

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!

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • yeah, the "but X had it first" comments rarely add any value. Sometimes it is interesting that a feature gap for a seemingly simple feature can last for years or decades, but in this case, it is such a minor feature that I doubt anyone really cared.
    • Linux dev quits after "personal attacks" from user over Kapitano antivirus tool by David Uzondu Kapitano was a tool with a simple job: to give the ClamAV scanning engine a modern face on Linux. It relied on the ClamAV database, a massive, constantly updated list used to sniff out all sorts of nasties like viruses, worms, and Trojan horses. Since ClamAV is primarily a command-line tool, it depends on a GUI (frontend) for users who prefer not to live in the terminal. There are apps like ClamWin on Windows, ClamXav on Mac, and, until recently, Kapitano on Linux. Screenshot of Kapitano Now, the dev behind the Linux frontend, "zynequ," has marked the project as "Not Maintained" following what he described as personal attacks and harsh words. It all started when a user created an issue on the project's Codeberg page with the title, "Kaptiano resulted in 24 positives- for win.exploits and Trojans." In the post, they claimed the antivirus frontend was generating false positives on their Linux Mint system. The user noted that all the flagged files were related to the Kapitano Flatpak itself and ended with a rather aggressive warning. The whole thing seemed "strange," they said, concluding with, "program has ZERO reviews, and should remain that way until source code is verified by an independent source. DO NOT DOWNLOAD!" Zynequ, the project's author, responded by calmly referencing the wiki and explaining that the problem was with ClamAV itself, not his application. Kapitano, built with GTK4 and libadwaita, is just a wrapper that sends commands to the clamscan utility but has no say in what gets flagged. The developer also called the user out for the "personal attacks." He addressed the zero reviews situation, pointing out that this was hardly a conspiracy since the project was very new, launching back in June. Zynequ insisted that there is nothing "fishy" about their code and that it is fully open for review. The interaction soured from there. After zynequ closed the issue, the user created a duplicate one, then proceeded to resubmit the complaint under issue #13, this time with a different title: Kapitano developer is a malicious actor. Get this malware distributor blocked. After a heated back and forth with the dev, the user finally posted, "Your project is off of my laptop disk. Let it rest. Goodbye." This exchange is what led to the zynequ publishing their final note. They explained that Kapitano was "a hobby project, created in my free time without any financial support," and that it's hard to stay motivated when "personal attacks" are directed towards you. Zynequ noted that the project's code was now released into the public domain under The Unlicense, meaning anyone could fork it and do whatever they want with it. Kapitano will be delisted from Flathub, and the Codeberg repo will still be alive for a few months before they delete it and close their account for good.
    • Being harder to detect as a non-human work, doesn't justify its existence, to me.
    • Yeah and my poor choice of not questioning it is entirely my bad. Normally I check up on that stuff.
    • My apologies. I did read the entire discussion, but I mistakenly conflated your comments with dustojnikhummer's. He is the main person my comments were directed towards. Having said that, you did seem overly eager to defend his point of view based on the assumption you just quoted. I'm not sure why anyone would make that assumption, but I realize now it wasn't your assumption, you were just weighing in assuming it was true. I personally would have questioned the assumption instead of going along with it, but I do understand your perspective now. Thanks.
  • Recent Achievements

    • One Month Later
      BA the Curmudgeon earned a badge
      One Month Later
    • First Post
      Doreen768 earned a badge
      First Post
    • One Month Later
      James_kobe earned a badge
      One Month Later
    • Week One Done
      James_kobe earned a badge
      Week One Done
    • Week One Done
      macomen earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      657
    2. 2
      ATLien_0
      253
    3. 3
      Xenon
      170
    4. 4
      neufuse
      148
    5. 5
      +FloatingFatMan
      133
  • Tell a friend

    Love Neowin? Tell a friend!