Feature suggestions: Partial archive extraction; ignore directories

58 views
Skip to first unread message

Bill Stewart

unread,
Jul 20, 2026, 11:58:33 AM (4 days ago) Jul 20
to innosetup
There may be use cases where it is necessary to extract only certain files (based on a name or a wildcard match) from an archive file.

Also, it might be useful in some cases to extract file(s) as if at the root of the archive; e.g., extract '/dirname1/dirname2/file.txt' as just 'file.txt'. (In other words, the same behavior as the info-zip unzip '-j' option.)

I would consider partial archive extraction as a much more important feature, particularly if there is a very large archive file involved.

Bill Stewart

unread,
Jul 22, 2026, 8:34:00 AM (2 days ago) Jul 22
to innosetup
Adrian Dragne wrote:

Please you test my setup.iss. I forced all files will be saved on C:\Vlaxcompil?
You can roll-on C:\ with D:\ X:\ but onl;y isinside setup,.iss
My solution can help you? is good enough for your needs?

Please reply to the group rather than directly to the author.

Martijn Laan - Inno Setup

unread,
Jul 22, 2026, 11:21:42 AM (2 days ago) Jul 22
to innosetup
Hi,

Internally it already supports partial extractions (to implement recursesubdirs yes/no), so that's nice. I suppose it would make the most sense for consistency to use the Excludes parameter for this, or a similar new one. So you would have to exclude things, instead of including.

ExtractArchive already has the FullPaths parameter for 'flat' extracts. Same for TExtractionWizardPage. Not sure how it would work for a [Files] entry, it is more deeply integrated into the installation process. I suppose it would need a new flag.

Could you please describe in more detail how you would actually use these features if they existed? I like your suggestions in general, but for me they often lack context. Without a concrete use case or example, it is hard for me to think it through properly, or to know if I am even thinking in the right direction.

Greetings,
Martijn

Op 20-7-2026 om 17:58 schreef 'Bill Stewart' via innosetup:
There may be use cases where it is necessary to extract only certain files (based on a name or a wildcard match) from an archive file.

Also, it might be useful in some cases to extract file(s) as if at the root of the archive; e.g., extract '/dirname1/dirname2/file.txt' as just 'file.txt'. (In other words, the same behavior as the info-zip unzip '-j' option.)

I would consider partial archive extraction as a much more important feature, particularly if there is a very large archive file involved.
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/4aa670c7-d4e0-444a-8347-8e274197a0a2n%40googlegroups.com.

Bill Stewart

unread,
Jul 22, 2026, 2:49:05 PM (2 days ago) Jul 22
to innosetup
On Wednesday, July 22, 2026 at 9:21:42 AM UTC-6 Martijn Laan - Inno Setup wrote:

Internally it already supports partial extractions (to implement recursesubdirs yes/no), so that's nice. I suppose it would make the most sense for consistency to use the Excludes parameter for this, or a similar new one. So you would have to exclude things, instead of including.

I would think excluding would be less useful than including. Usually we have an idea of the files we want to extract from an archive, rather than files we want to exclude.

ExtractArchive already has the FullPaths parameter for 'flat' extracts. Same for TExtractionWizardPage. Not sure how it would work for a [Files] entry, it is more deeply integrated into the installation process. I suppose it would need a new flag.

Right, I forgot about the FullPaths parameter; thanks for the reminder.
 
Could you please describe in more detail how you would actually use these features if they existed? I like your suggestions in general, but for me they often lack context. Without a concrete use case or example, it is hard for me to think it through properly, or to know if I am even thinking in the right direction.

I already do this using the Info-ZIP unzip.exe in an IS installer I created for Syncthing. It downloads the latest version and extracts only needed files from the download. It does something like this:

unzip -j -d "{app}" "{tmp}\downloadedfile.zip" amd64/syncthing.exe

In this way it doesn't need to extract the entire download to a temporary directory but rather just what is needed.

As I said previously, this could be helpful in cases where the files to extract are in a very large compressed file and it would be very time and resource intensive to extract the entire content of a very large archive just to get at a few files therein.

Gavin Lambert

unread,
Jul 22, 2026, 8:36:41 PM (2 days ago) Jul 22
to innosetup
On Thursday, July 23, 2026 at 6:49:05 AM UTC+12 Bill Stewart wrote:
As I said previously, this could be helpful in cases where the files to extract are in a very large compressed file and it would be very time and resource intensive to extract the entire content of a very large archive just to get at a few files therein.

If you're only downloading archives that you control, then you can just make archives that only contain the files that you actually want.

And you shouldn't really be downloading archives that you don't control, because you don't know if someone has slipped in some malware when you weren't looking. 

Gavin Lambert

unread,
Jul 22, 2026, 8:44:54 PM (2 days ago) Jul 22
to innosetup
Mere moments ago, quoth I:
If you're only downloading archives that you control, then you can just make archives that only contain the files that you actually want.

And you shouldn't really be downloading archives that you don't control, because you don't know if someone has slipped in some malware when you weren't looking. 

Other benefits of this include reducing the download size (since you're not downloading things you don't need and then discarding them) and only downloading versions that you've (presumably) tested as compatible, rather than potentially getting something unexpected (even if not malware).  And insulating you a bit if a server you don't control goes down or deletes the file.

Where you need to be a little careful is whether their license allows you to redistribute only part of the original distribution, but then ideally you should ask for permission or find a different tool if that's not the case.

Bill Stewart

unread,
Jul 23, 2026, 10:36:25 AM (yesterday) Jul 23
to innosetup
On Wednesday, July 22, 2026 at 6:36:41 PM UTC-6 Gavin Lambert wrote:

If you're only downloading archives that you control, then you can just make archives that only contain the files that you actually want.

And you shouldn't really be downloading archives that you don't control, because you don't know if someone has slipped in some malware when you weren't looking. 

We can appreciate the advice while still simultaneously believing that extracting only certain files from an archive would be a helpful feature (even for archives that we control.)

Reply all
Reply to author
Forward
0 new messages