Skip to content
Advertisement

Nested if statement returns no such item

my scipt is working as in searching for zip files, unzip and do the things i want. But problem arise when i have nested zip files inside the zip file, so i thought maybe i copy the working if statement, make a few adjustments but i still cant get it to work.

JavaScript

what i want to achieve is to simply unzip the nested zip files in the current directory they are found, run maincom(), if possible, maybe delete the nested zip file after unzip completion

Thanks guys

Advertisement

Answer

Try this:

JavaScript

In principle, this will loop until there is no more zipfile in your working directory.

Which means: if zipfiles are present at iteration 1 and contain other zipfiles, those will be extracted. Which means: zipfiles will be present at iteration 2. And will be extracted. Etc Etc…

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement