Hi all,
i have some code to extract a ZipArchive received from url:
System.IO.Compression.ZipArchive zipArchive; System.IO.Compression.ZipArchiveEntry zipEntry; System.IO.Stream zippedStream; System.IO.Stream unzippedStream; System.IO.StreamReader reader; str line; zippedStream = File::UseFileFromURL(url); zipArchive = new System.IO.Compression.ZipArchive(zippedStream); zipEntry = zipArchive.GetEntry(fileName); unzippedStream = zipEntry.Open(); reader = new System.IO.StreamReader(unzippedStream, System.Text.Encoding::UTF8); line = reader.ReadLine();
My current challenge is to extract a file without knowing the filename. I just know that i need to extract the second entry in the ZipArchive. Is there a way to get the filenames from the ZipArchive or the second element of zipArchive.Entries?
*This post is locked for comments
Great, you gave me the right direction.
Thank you!
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156