Extracting a zip, sometimes parent and child folders with same name

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Terka
Senior Member
Senior Member
Posts: 326
Joined: 2006-05-24, 09:04 UTC

Extracting a zip, sometimes parent and child folders with same name

Post by *Terka »

hi,
if i extract a zip file, sometimes it has a folder in the archive, sometimes not.
After extract the structure can look like:
\pictures\pictures\001.jpg
\pictures\pictures\002.jpg
can i somehow identify such
parent and child folders with same name
and simplify the structure to:
\pictures\001.jpg
\pictures\002.jpg
Thank you!
PS: is there a way to automatically prevent these duplicates while extracting?
User avatar
Dalai
Power Member
Power Member
Posts: 9965
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: parent and child folders with same name

Post by *Dalai »

I don't know of any way to do this with TC. WinRAR has an option in Paths > [X] Remove redundant folders from extraction path. 7-zip seems to have a similar option 7-Zip > Eliminate duplication of root folder.

Not sure if these can help, but I guess you can find out :).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Fla$her
Power Member
Power Member
Posts: 2998
Joined: 2020-01-18, 04:03 UTC

Re: parent and child folders with same name

Post by *Fla$her »

2Dalai
Hm. I didn't know that in 2014 -spe was added to 7-zip. Works:

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Utils\7-Zip\7zG.exe x
%N -o"%O" -spe
wcmicons.dll,31
Unpack the archive into a folder without|duplicating a single folder with the same name
Overquoting is evil! 👎
Terka
Senior Member
Senior Member
Posts: 326
Joined: 2006-05-24, 09:04 UTC

Re: parent and child folders with same name

Post by *Terka »

The solution, it might come handy for other users, not sure if i may link another forum but i try:
https://www.voidtools.com/forum/viewtopic.php?t=12907&e=1&view=unread#unread
Fla$her
Power Member
Power Member
Posts: 2998
Joined: 2020-01-18, 04:03 UTC

Re: parent and child folders with same name

Post by *Fla$her »

2Terka
Another forum requires authorization. Why are you not satisfied with my button?
Overquoting is evil! 👎
User avatar
Usher
Power Member
Power Member
Posts: 1726
Joined: 2011-03-11, 10:11 UTC

Re: parent and child folders with same name

Post by *Usher »

Andrzej P. Wozniak
Polish subforum moderator
Post Reply