I have an archive which, for reasons beyond my comprehension, contains 900 files all with the same name. That means that if I ask 7zip to extract them all, at the end there is just one file. The solution, of course, is to ask 7zip to extract the files one at a time, and rename each one to something else.

But how, pray tell, do you ask 7zip to extract one particular file when they all have the same name??

Is there some way to ask 7zip to extract the Nth file in the archive? That would work...

(I want to do this from a script, so I don't really want to use 7zip's interactive mode.)


By supplying the -aou switch, you can make 7zip extract all the files, but give each one a unique name. Now you just have to somehow guess which file on disk corresponds to which metadata from the file listing...

  • ok, to give names for 900 files - no problem, sort them by date and take the names from the origin. – user55518 Mar 19 '14 at 16:24
  • Nice idea, but... they have the dates from the archive. Which are all identical. – MathematicalOrchid Mar 19 '14 at 16:26
  • you have access,modify and change dates they are not all unique. check with stat file – user55518 Mar 19 '14 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.