Many zip files have a root folder, how do I unzip a zip file and get rid of the root folder?
I know that there are globmapper:
<unzip dest="${dest.path}">
<fileset dir="${source.path}">
<include name="**/zipfile*.*.zip" />
</fileset>
<mapper>
<globmapper from="rootFolder/*" to="*" />
</mapper>
</unzip>
But what if I do not know the name of the root folder? Wildcards do not work, for example.
<globmapper from="root*Folder/*" to="*" />
Is there a way to use wildcards or mapper / function that suit without a root folder?
source
share