Optimize script for creating archived public dir

[#67398842]