How to Unzip multilevel files recursively.

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

MultiUser

New Member
Jul 6, 2023
27
1
3
First off, I hope that lingo is correct. Let me explain what I am trying to do...

I have a bunch of .rar files that have several .zip files in them.
So its like .RAR that when unzipped is just a file of that name. Then, when I open that folder, I need to unzip (OR move here) the contained zip files.

I can easliy unzip the top level of .rar files in one motion with the "Extract each archive to separate folder" when I right click... This being a feature of WINRAR.
However Then I am left with individual files to open, select the 5 zip files and right click "move here". to get everything unzipped to a single place within that file because I dont want all of the top level rar files mixed together.

So if anyone can help me write a batch file or knows a good cmd script or something.. I was able to get all of the files to output in a single place but it was too jumbled to use, thus why I am asking how to get each set of unzipped zip files into its own folder.
Hope that makes sense.

I figure a good batch program could do the job, but I cant for the life of me figure it out.

I just didnt know where else to ask except this forum of computer people. lol
 

XMR

New Member
Aug 28, 2017
10
12
3
32
Code:
find . -type f -name '*.rar' -exec unrar x -idcdp -ad {} \;
find . -type f -name '*.zip' -exec unzip -d ./dest-dir {} \;
 

MultiUser

New Member
Jul 6, 2023
27
1
3
I put that in the batch file but I get returns of "file not found", Test.bat is definitely in the same file as the .rar files. Not sure what I am doing wrong here.
Also, can you give me and example for the parts that need to be filled in like ./dest-dir should that look like "./D:\File\folder\" or something else?