Batch script to re-compress DOCX, XLSX, PPTX, ODT and ODS files so their size is smaller and they can be still opened by Microsoft Office without any additional actions. Script decompresses document file, optimizes image files (JPEG and PNG) archived inside and compresses it all again but with stronger compression.
Required:
- MS Windows
- 7-zip
Optional (for date-time preserving):
- nabiy's "touch" utility or any other compatible
Optional (for image optimization):
repack.bat target_file.docx
Original file will be renamed to target_file.docx.bak
.
- Add options for enable/disable file overwrite and backup deletion
- Recognizing corrupted ZIP archives
- Automatic component download (perhaps using some VB script?)
- Reg script to add "Repack" option to context menu