Saturday 3 March 2018

How can I recursively extract zip files on Windows including deletion?

How can I recursively extract zip files on Windows? Each zip file should be unzipped in a new subdirectory, and the zip file should be deleted afterwards.


Each existing or created directory should be scanned for further existing zip files, and so forth.


So the problem is, that I have a huge zip file, which contains many directories with perhaps many further zip files. The original zip files should simply be freed from any zip files, the originial directory tree should be kept, with the convention that each zip file should be represented as a own directory.


So the logic behind is: unzip file in a directory and delete zip file -> go into that directory and unzip all zip files there in the same way -> go into every exisiting subdirectory of the directory and do the same -> and so on recursively


Rough proposal for a recursively programmed batch script file:


unzip_folder(%%directory):

for %%file (%%directory/*.zip) do (unzip %%file | del %%file)

for /d %%directory (*) do ( call unzip_folder(%%directory) )

return

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...