Zip/Unzip Files

EDIS Online User Guide – Zip Tasks

Zipping Files
This stored procedure compresses folder contents into a zip file

Procedure: SSISDB.EDIS.usp_zip_files

Parameters

Name Description Default Value
@folder_path Folder path that you want to zip None; Required
@zip_file_path File path for the zip file you want to create None; Required
@include_sub_folders Flag indicating if you want to include all sub folders in the @folder_path directory 0 (False)
@append_to_existing_file Flag indicating if you want to append the folder path contents to an existing file. If it is set to false, the existing zip file path will be overwritten 0 (False)

Examples

This example takes all text files (ending in .txt) in the directory C:\temp\reports and zips them into a file at path C:\output\reports.zip. Since the @include_sub_folders flag is set to 0, no sub folders or files below C:\temp\reports will be included.

EXEC SSISDB.EDIS.usp_zip_files

 @folder_path = 'C:\temp\reports\*.txt'

,@zip_file_path = 'C:\output\reports.zip'

,@include_sub_folders = 0

 

Unzipping Files
This procedure unzips files from a zip file to a directory path

Procedure: SSISDB.EDIS.usp_unzip_files

Parameters

Name Description Default Value
@zip_file_path The target zip file path that you want to unzip None; Required
@folder_path Folder path you want to extract zip file contents to None; Required

Examples

This example unzips the file C:\output\reports.zip to H:\daily reports\March\1\ folder

EXEC SSISDB.EDIS.usp_unzip_files

 @zip_file_path = 'C:\output\reports.zip'

,@folder_path = 'C:\daily_reports\March\1\'