Jefe
Jefe

Reputation: 177

How to extract multiple zip files in a directory using MSBuild

I'm trying to extract all the zip files in a directory using MSBuild. Rather than calling unzip task multiple times per each zip file found in the directory, I'd rather to use a loop somehow, for instance:

for each zip file in $(directory)
    <unzip file=@(zipFile) targetDirectory=$(destination) />

Thanks,

Upvotes: 1

Views: 1797

Answers (1)

Brian Kretzler
Brian Kretzler

Reputation: 9938

You're close, use task batching, like this:

<unzip file=%(zipFile.Identity) targetDirectory=$(destination) /> 

Upvotes: 1

Related Questions