Skip to main content
hamzas0003
May 14, 2025
Solved

unable to read nested zip files inside zip document?

  • May 14, 2025
  • 3 replies
  • 0 views

I have a main zip file that contains other nested zip files. I need to extract all these files and apply some custom naming rules to the extracted files. Here’s what I’m looking to achieve:

Extract the Main Zip File: Unzip the main archive to access the nested zip files.

Nested Zip Files: Perform some validation on the names of the nested zip files.

I'm facing two problems:

1-When I try to extract a zip file that contains nested zip files, it doesn't extract them correctly and doesn't output any errors. However, if I include other types of documents, like .docx or .txt, they are extracted correctly.

2-How can I read the contents of a zip file (e.g., the names and types of the nested files)? I’m using a zip extractor, but it doesn't seem to offer this option.

Does anyone have any ideas on how to solve these issues?

Best answer by mikes0011

Can you please specify what you mean by:

it doesn't extract them correctly

What DOES happen?  Do you see the list of extracted documents in the destination folder or not?  What exactly happens "incorrectly"?

How can I read the contents of a zip file

As far as I know, our capabilities in Appian are pretty much limited to unzipping the entire ZIP file into a folder, and then reading the resulting contents from there.  Have you tried this?

3 replies

mikes0011
mikes0011Answer
Brainy
May 14, 2025

Can you please specify what you mean by:

it doesn't extract them correctly

What DOES happen?  Do you see the list of extracted documents in the destination folder or not?  What exactly happens "incorrectly"?

How can I read the contents of a zip file

As far as I know, our capabilities in Appian are pretty much limited to unzipping the entire ZIP file into a folder, and then reading the resulting contents from there.  Have you tried this?

hamzas0003
May 14, 2025

At first, I was passing a ZIP file that had been incorrectly converted, so when I logged the errors, it showed a message indicating that nothing was extracted because the file was not properly decrypted. Now, I am passing the correct file and have set up a dynamic folder to extract the ZIP file into each time. However, I'm still unsure how to iterate over the documents inside that folder. Are there any functions to access the contents of a folder?

mikes0011
Brainy
May 14, 2025
Are there any functions to access the contents of a folder?

have you tried folder()?