Hi Team,
How to unzip folder and save files to desired folder?
I am trying to Unzip folder using unzip plugin in bot_task and code as follows
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="groovy">
<loop item="files">
<list>
<unzip>
<file type="binary" path="D:\Temp.zip"/>
</unzip>
</list>
<body>
<script><![CDATA[
for(def item1 : files.getWrappedObject().getChildren() ){
fileName = org.apache.commons.io.FilenameUtils.getName(item1.getName());
println fileName
fileContent = item1
}
]]></script>
<file action="write" type="binary" path="D:\\ExtractedFolder\\${fileName}">
<template>${fileContent}</template>
</file>
</body>
</loop>
<export include-original-data="true">
</export>
</config>```
Thanks