Way to copy a zip file and replace folder inside it with folder on node?

What actually i want to to copy a zip file from share directory,
and want to unzip it and replace folders on node with folder inside zip file ?


If the zip file can be retrieved from URL, then I would suggest to grab the file by using the windows_zipfile LWRP from the windows cookbook. This resource would grab the file and unzip it.

To utilize the windows cookbook you need define it as a dependency in your cookbooks metadata.rb

If you can only get it from a share then
Use the remote_file resource to grab the file that you want from the share
After that you can use the windows_zipfile resource that would point to the local zip file that was previously download by the remote_file resource.

The other part I do not understand exactly. You want to put in folders from a zip archive into a specified folder?
There is no chef resource that would do that for you. You would need to pragmatically write that in for example PowerShell and use the powershell_script resource to execute your custom code. Please be aware that you should guarantee idempotency with the not_if or ony_if guards