Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 1202  / 1 Year ago, tue, may 2, 2023, 10:05:05

So I unzipped a file with 1000+ folders, is there a way to "flatten" these folders? As in, grab all the contents from every folder and dump them into another directory.


More From » files

 Answers
5

The easiest way is when you unzip them. If you uncheck the "preserve paths" option (it may have a different name in your zip tool), the folder structure will be ignored during the unzip process, and everything will get put into one folder.



For unzip this would be the option -j to junk paths:



unzip -j archive.zip


Edit: I must share credit for the correct answer with Takkat. The first paragraph was my answer, but the next two lines were Takkat's.


[#36878] Thursday, May 4, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wenceslockro

Total Points: 494
Total Questions: 127
Total Answers: 97

Location: Chad
Member since Mon, Dec 5, 2022
1 Year ago
;