one zip file, but certain files to different locations

I’m trying to work out how i can achieve this.

I have one zip file that i want extract and 6 files go in one folder, a different 6 to another.

The files are the same name but change slightly per month as part of a release.

I’ll be using the below to unzip the files :

Add-Type -assembly ""

[io.compression.zipfile]::ExtractToDirectory($Location, $destination)

But how can i move certain files to different locations ? Could i create an XML file ? Or create two hash tables and copy them to required locations ?

XML would be good, but not sure how to go about this.

In a single unzip operation, you can’t send the files to different destinations. You have to unzip them first, and then move them to where you want them.

OK, thanks Don.
Just for my own reference, could i set directory paths through XML and use powershell to look at the XML and do the copy ? I’m happy i could do this through splatting but interested by the learning the XML way.

I’m not sure what “the XML way” even is :). I’m not aware of a command that can take an XML file as input to a file copy operation.

OK Don. My Mistake, thought i could do this sort of thing with XML.
Thanks for your time.

Is there something I’m missing? I mean, was there something somewhere you read along those lines? Just because I’m not aware doesn’t mean it doesn’t exist, so if you’ve seen something I’d love to have a look!

Sorry Don, no i’ve not seen anything. Just curious to know if it could be done. Thought it could be quite cool ! :slight_smile:

Time for you to write a command that does :).

Ha ha, Sounds like a challenge, i’ll crack on !