Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any ZIP tools that do similar to the patch -p1 command, where the first N directory names would get ignored?

My users send me ZIP files that often contain one unnecessary directory, and instead of unzipping them in place, I have to unzip, then go into the subdirectory and move all the files out. Sometimes it's a zip of thousands of files, and that extra move step can take a while. If 7z or something had 7z x -p1 my_zip.zip, that first directory could be ignored. I'd still want to have the directory tree inside that subdirectory.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Not finding anything built-in to do the work, I created https://github.com/tgmayfield/zip-dir-strip

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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