I need to Compress/Zip an xls file which is generated by my macro. I have IZarc installed on my machine.
Can somebody please suggest the batch code to zip an xlx file?
I need to Compress/Zip an xls file which is generated by my macro. I have IZarc installed on my machine.
Can somebody please suggest the batch code to zip an xlx file?
This is copy-pasted from this link.
@ECHO OFF
REM Replace space in hour with zero if it's less than 10
SET hr=%time:~0,2%
IF %hr% lss 10 SET hr=0%hr:~1,1%
REM This sets the date like this: mm-dd-yr-hrminsecs1/100secs
Set TODAY=%date:~4,2%-%date:~7,2%-%date:~10,4%-%hr%%time:~3,2%%time:~6,2%%time:~9,2%
REM Use IZArc to Zip files in folder c:\testzip and place the zip archive in C:\testmove
ECHO.
ECHO Zipping all files in C:\testzip and moving archive to c:\testmove
ECHO.
izarcc -a -cx "C:\testmove\xxxx_%TODAY%.zip" "C:\testzip\*.*"
ECHO.
ECHO Delete the files in orginal folder
DEL "C:\testzip\*.*"
PAUSE
For completeness, this script looks good without any cuts.
this utility might be something for you
https://mega.nz/#!4VZnFb6T!nqv0JTqJYLff7e44WQS6-VvhAU-Cs7WBnHZXFd9FRWc
inside there will be 2 .exe files. one for zipping and one for un-zipping. there will also be an .txt file tells you how to use it
virus-total scan https://www.virustotal.com/da/file/5a38d605e943a1f5ce185e19eb9bda0969d370e7aad9a03575fab7852ed48157/analysis/1488190750/
EXAMPLE OF USAGE:
Zip Files
@echo off
title Zip files in folder
zip.exe zippedxlxfiles path/to/xlxfiles/*.*
pause
Zip a single file
@echo off
title Zip files in folder
zip.exe zippedxlxfiles path/to/xlxfiles/filename.xlx
pause
Note this will zip all the files in the folder you choose
Un-zip Files
@echo off
title Zip files in folder
unzip.exe zippedxlxfiles
pause
Note that this will unzip the files in the same directory as the exe itself