We are trying to zip a folder(size ~100GB) on our client server through a bat file. This bat file is triggered via an autosys job. The folder contains files of .dat and a .523 format file
We have tried several options like below:
1. Using PKZIP utility. While unzipping the file it says the files are corrupted and terminates the process.
2. Using Winzip. On completion of zip process, it opens a 'ADD Complete' dialogue box and waits for user to hit 'OK'. Since we are triggering the bat file from autosys, we do not see this dialogue box when we try to log on to the server. We have a interactive version on Winzip installed on server and we cannot install the wzzip version of winzip. The code we used is as follows:
SET ZIPDIR="C:\Program Files (x86)\WinZip"
CALL %ZIPDIR%\WINZIP32.EXE -a -r %CEDEARCH%\BACKUP__%date:~-4,4%%date:~-10,2%%date:~-7,2%.zip D:\DATA\Test\*.*
after executing this the above code waits for 'OK' to be hit and because of this the autosys job does not terminate. I tried to add a VBS script after it to just hit enter but it does not work.
VBS script:
set oWShell = createobject("WScript.Shell")
WScript.Sleep 2000
oWShell.Sendkeys "{enter}"
Using 7Zip. After doing some research my colleague tried to use the 7Zip and the zip and unzip works perfectly fine. No manual intervention required. The only problem is it takes around 7 - 9 hrs to complete. That's a LOT of time. Not acceptable. :( Winzip takes around 3 hrs.
SET ZIPDIR= "C:\Program Files\7-Zip" CALL %ZIPDIR%\7z.EXE a -r D:\PES_PROD\ARCHIVE\Calc_Backup\CALCITDBACKUP__%date:~-4,4%%date:~-10,2%%date:~-7,2%.zip D:\PES_PROD\DATA\CALC*.* -mmt
Can anyone suggest any better idea or any other method we have not thought of. Thanks and