Thursday, February 17, 2022

Script to Zip and Unzip Files using Window shell



Often times applications require files to be zipped to a .zip file and extract files from the same. makezip_unzip.vbs  uses Windows shell do this easily.



Create Zip File Example

  1. Arrange all folders, sub folders and files matching zip file structure inside a "stage" folder. Example, d:\temp\reports
  2. Execute  in command window
           makezip_unzip.vbs   "d:\temp\reports"   "d:\reports.zip"

if not exist, d:\reports.zip will be created.

Extract from Zip file Example

Execute in command window
           makezip_unzip.vbs    "d:\reports.zip"   "d:\temp\reports"
If not exist, d:\temp\reports folder will be created to receive files from the .zip file. 
Note that full path must be supplied to the arguments.



Source and Binaries can be found here.


No comments:

Post a Comment