0

I have a use case in an application using C++ and Qt (on windows 10). The application uses 7zip.exe as a subprocess to uncompress the files in a selected folder. The files are selected when a root folder is selected using a code snippet as shown below.

void MainWindow::on_browseButton_clicked()
{

    QDir directory = QFileDialog::getExistingDirectory(this);
        zipFiles = directory.entryList(QStringList() << "*.zip", QDir::Files);
       foreach(QString filename3, zipFiles) {
           qDebug() << filename3;
       }
}

This works fine for normal files (.zip files with no other inner .zip file inside them). But I have a use case in which I need to select inner .zip files inside a zip file. How can I achieve this using the above code snippet.

  • After extracting your archive you can iterate over the output folder of files it extracted to extract more. I don't think any of that will be in this code block. – drescherjm Apr 27 '22 at 18:33
  • could you please provide some code snippet to understand it better. I am new to qt and cpp – Syed Iftekharuddin Apr 27 '22 at 18:34
  • 1
    Something like this: [https://stackoverflow.com/questions/8052460/recursively-iterate-over-all-the-files-in-a-directory-and-its-subdirectories-in](https://stackoverflow.com/questions/8052460/recursively-iterate-over-all-the-files-in-a-directory-and-its-subdirectories-in) – drescherjm Apr 27 '22 at 18:36

0 Answers0