{"id":14937,"date":"2022-10-17T07:41:00","date_gmt":"2022-10-17T05:41:00","guid":{"rendered":"https:\/\/expert-only.com\/?p=14937"},"modified":"2022-11-09T16:58:22","modified_gmt":"2022-11-09T15:58:22","slug":"zip-files-with-ssis","status":"publish","type":"post","link":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/","title":{"rendered":"Zip files with SSIS and 7zip"},"content":{"rendered":"\n<h4 class=\"has-text-align-center wp-block-heading\" id=\"h-tutorial-to-zip-files-and-folders-into-compressed-archives-with-ssis-and-the-7zip-software\"><strong><em>Tutorial to zip files and folders into compressed archives with SSIS and the 7zip software.<\/em><\/strong><\/h4>\n\n\n\n<p>First, to zip files with SSIS without script, we need to use the 7zip software in addition to the native components. Indeed, several options are available to the developer for compressing files. For example, it is useful to reduce the size of folders containing text, Excel, or <a href=\"https:\/\/expert-only.com\/en\/sql-server-db\/empty-the-sql-server-transaction-log-and-fix-error-9002\/\">database files<\/a>. In fact, all types of archive files can be compressed: data files, among other types: .XLS, .XLSX, .CSV, .DOC, .TXT, .DOCX, .XML, <a href=\"https:\/\/docs.fileformat.com\/web\/html\/\">.HTML<\/a>, .PDF, .XLA, .ODS, .JPG, .PNG, etc.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#how-to-zip-files-with-ssis-and-the-7zip-software\" >How to zip files with SSIS and the 7zip software?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#1-download-install-and-test-7zip\" >1. Download, install and test 7zip<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#11-download-the-7zip-software\" >1.1 Download the 7zip software<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#12-prepare-the-test-files-to-zip\" >1.2 Prepare the test files to zip<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#13-zip-one-file-with-7-zip-and-ms-dos\" >1.3 Zip one file with 7-zip and MS-DOS<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#2-compress-a-text-file-with-ssis-and-7zip\" >2. Compress a text file with SSIS and 7zip<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#3-ssis-package-to-compress-multiple-files-into-one-archive\" >3. SSIS package to compress multiple files into one archive<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#4-zip-each-files-into-a-separate-archive-with-ssis\" >4. Zip each files into a separate archive with SSIS<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#41-set-up-the-loop-and-create-two-variables\" >4.1 Set-up the loop and create two variables<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#42-configure-the-process-execution-task-to-call-7zip\" >4.2 Configure the process execution task to call 7zip<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#43-run-the-package-to-zip-the-files\" >4.3 Run the package to zip the files<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#5-compress-and-add-current-time-to-archive-names\" >5. Compress and add current time to archive names<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#6-display-the-list-of-all-7zip-options\" >6. Display the list of all 7zip options<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#conclusion-on-zipping-files-with-ssis\" >Conclusion on zipping files with SSIS<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"how-to-zip-files-with-ssis-and-the-7zip-software\"><\/span>How to zip files with SSIS and the 7zip software?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>This tutorial explains step by step how to compress one or several files in a command line and in an automated way. This package uses a third-party tool, <a href=\"https:\/\/www.7-zip.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">the free and open source compression software 7ZIP<\/a>. So follow the steps below to proceed, use an existing SSIS package or <a href=\"https:\/\/expert-only.com\/en\/ssis\/create-ssis-project-visual-studio-2019\/\">create a new one into a project<\/a>. The example below uses the Execute Task Component of SSIS, it allows you to call .bat files with <a href=\"https:\/\/expert-only.com\/en\/ms-dos\/\">MS-DOS commands<\/a> or directly Windows executables.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1-download-install-and-test-7zip\"><\/span>1. Download, install and test 7zip<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The 3 following steps are not using SSIS yet, the goal is to make sure the 7zip works outside of the package first.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"11-download-the-7zip-software\"><\/span>1.1 Download the 7zip software<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To begin with, download the compression software from <strong><a href=\"https:\/\/www.7-zip.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">7zip.org<\/a><\/strong> and install it on the development PC and also on the server if the SSIS package is deployed on another <a href=\"https:\/\/expert-only.com\/fr\/tag\/windows\/\">Windows<\/a> machine.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"740\" height=\"480\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-1-7-zip-official-website.jpg\" alt=\"Download 7-zip from the official 7-zip.org website\n\" class=\"wp-image-13111\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-1-7-zip-official-website.jpg 740w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-1-7-zip-official-website-300x195.jpg 300w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/><figcaption class=\"wp-element-caption\">Download 7-zip from the official 7-zip.org website<\/figcaption><\/figure>\n\n\n\n<p>After the installation, the 7-zip executable file, named 7z.exe, is located here:<\/p>\n\n\n\n<p><em>C:\\Program Files\\7-Zip\\7z.exe<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"12-prepare-the-test-files-to-zip\"><\/span>1.2 Prepare the test files to zip<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Copy a CSV file to test the MS-DOS command. Here is the example csv file used in this SSIS tutorial.<\/p>\n\n\n\n<div class=\"wp-block-file aligncenter\"><a id=\"wp-block-file--media-969b4219-9bf1-4b7d-8336-7dd2216fe0b4\" href=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/Customers_Data_1.csv\"><strong>Customers_Data_1.csv<\/strong><\/a><a href=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/Customers_Data_1.csv\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-969b4219-9bf1-4b7d-8336-7dd2216fe0b4\"><strong>Download<\/strong><\/a><\/div>\n\n\n\n<p>Download the file, duplicate it and rename the copied files like this, the 3 files are the same, but the name is different:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Customers_Data_1.csv<\/li>\n\n\n\n<li>Customers_Data_2.csv<\/li>\n\n\n\n<li>Customers_Data_3.csv<\/li>\n<\/ol>\n\n\n\n<p>Go to the folder containing the CSV files. And display the files to be zipped. Like for example <strong>C:\\data<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"340\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-7-csv-source-files.jpg\" alt=\"CSV files to compress with SSIS and 7-zip\" class=\"wp-image-13148\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-7-csv-source-files.jpg 720w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-7-csv-source-files-300x142.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption class=\"wp-element-caption\">CSV files to compress with SSIS and 7-zip<\/figcaption><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"13-zip-one-file-with-7-zip-and-ms-dos\"><\/span>1.3 Zip one file with 7-zip and MS-DOS<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Then test the call directly from MS-DOS before using 7-zip from SSIS. Open a Windows command prompt and type these commands.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd c:\\data\ndir<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"480\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-2-check-csv-files-ms-dos.jpg\" alt=\"Check for the presence of CSV files to compress with a DOS command\" class=\"wp-image-13116\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-2-check-csv-files-ms-dos.jpg 720w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-2-check-csv-files-ms-dos-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption class=\"wp-element-caption\">Check for the presence of CSV files to compress with a DOS command<\/figcaption><\/figure><\/div>\n\n\n<p>Call the executable file 7z.exe to compress the file.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\"C:\\Program Files\\7-Zip\\7z.exe\" a Customers_Zipped.zip Customers_Data_1.csv<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"580\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-3-zip-file-call-7z-ms-dos.jpg\" alt=\"Compress a CSV file directly from an MS-DOS command to test 7-zip\" class=\"wp-image-13120\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-3-zip-file-call-7z-ms-dos.jpg 780w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-3-zip-file-call-7z-ms-dos-300x223.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-3-zip-file-call-7z-ms-dos-768x571.jpg 768w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-3-zip-file-call-7z-ms-dos-80x60.jpg 80w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><figcaption class=\"wp-element-caption\">Compress a CSV file directly from an MS-DOS command to test 7-zip<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2-compress-a-text-file-with-ssis-and-7zip\"><\/span>2. Compress a text file with SSIS and 7zip<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Now, we know the 7zip software works and it is able to zip files without errors. From Visual Studio, inside an SSIS <em>Control Flow<\/em>, add the <strong><em>Execute Process Task<\/em><\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"480\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-4-add-execute-process-task.jpg\" alt=\"Run an MS-DOS command line to compress files with SSIS and 7zip\" class=\"wp-image-13133\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-4-add-execute-process-task.jpg 720w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-4-add-execute-process-task-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption class=\"wp-element-caption\">Run an MS-DOS command line to compress files with SSIS and 7zip<\/figcaption><\/figure><\/div>\n\n\n<p>This first option is done through a simple MS-DOS command call. Write the hard-coded parameters directly inside the SSIS Execute Process Task component in the control flow. To set up the component, go to the <em>Process<\/em> tab, enter the following values:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Executable: <strong><em>C:\\Program Files\\7-Zip\\7z.exe<\/em><\/strong><\/li>\n\n\n\n<li>Arguments: <strong><em> a Customers_Zipped.zip Customers_Data_1.csv<\/em><\/strong><\/li>\n\n\n\n<li>WorkingDirectory: <strong><em>C:\\data<\/em><\/strong><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"440\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-5-call-7-zip-one-file-from-package.jpg\" alt=\"Configure the SSIS Execute Process Task editor with 7zip and CSV file path\" class=\"wp-image-13140\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-5-call-7-zip-one-file-from-package.jpg 780w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-5-call-7-zip-one-file-from-package-300x169.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-5-call-7-zip-one-file-from-package-768x433.jpg 768w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-5-call-7-zip-one-file-from-package-678x381.jpg 678w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><figcaption class=\"wp-element-caption\">Configure the SSIS Execute Process Task editor with 7zip and CSV file path<\/figcaption><\/figure><\/div>\n\n\n<p>This command calls the 7z.exe utility directly from its location on the PC. The SSIS task can also use another MS-DOS command line compatible tool. Of course, the options are configurable, and it is possible to choose the compression mode and format. Finally run the task to compress the files.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"440\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-6-execute-process-task-success.jpg\" alt=\"Run the SSIS task to compress files from a Windows folder\" class=\"wp-image-13157\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-6-execute-process-task-success.jpg 720w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-6-execute-process-task-success-300x183.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption class=\"wp-element-caption\">Run the SSIS task to compress files from a Windows folder<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3-ssis-package-to-compress-multiple-files-into-one-archive\"><\/span>3. SSIS package to compress multiple files into one archive<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In the same way, it is possible to add several files to the same ZIP archive, using a filter as an argument rather than the full file name. To do this, simply replace the Arguments parameter of the process execution task:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Arguments: <strong><em>a Customers_Zipped.zip Customers_*.csv<\/em><\/strong><\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"320\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-8-zip-multiple-files-ssis.jpg\" alt=\"Compress multiples files in a folder into a ZIP archive with SSIS\" class=\"wp-image-13169\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-8-zip-multiple-files-ssis.jpg 780w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-8-zip-multiple-files-ssis-300x123.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-8-zip-multiple-files-ssis-768x315.jpg 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><figcaption class=\"wp-element-caption\">Compress multiples files in a folder into a ZIP archive with SSIS<\/figcaption><\/figure><\/div>\n\n\n<p>All files with a CSV extension are compressed in the same zip archive. The result after running the two variants with two zip files:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Customers_Data_1.zip: contains only one compressed file\n<ul class=\"wp-block-list\">\n<li>Customers_Data_1.csv<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Customers_Zipped.zip: contains all three compressed files:\n<ul class=\"wp-block-list\">\n<li>Customers_Data_1.csv<\/li>\n\n\n\n<li>Customers_Data_2.csv<\/li>\n\n\n\n<li>Customers_Data_3.csv<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"340\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-9-result-zipped-file.jpg\" alt=\"CSV files compressed by the SSIS package into one ZIP archive\" class=\"wp-image-13274\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-9-result-zipped-file.jpg 720w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-9-result-zipped-file-300x142.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption class=\"wp-element-caption\">CSV files compressed by the SSIS package into one ZIP archive<\/figcaption><\/figure><\/div>\n\n\n<p>The Customers_Zipped.zip file contains the 3 files with the CSV extension in the source folder C:\\data. When clicking on the archive, the 3 files are listed.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"340\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-10-multiple-zip-files-content.jpg\" alt=\"Content of the ZIP file with the 3 CSV files detected by 7-zip\" class=\"wp-image-13279\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-10-multiple-zip-files-content.jpg 720w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-files-7zip-10-multiple-zip-files-content-300x142.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><figcaption class=\"wp-element-caption\">Content of the ZIP file with the 3 CSV files detected by 7-zip<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4-zip-each-files-into-a-separate-archive-with-ssis\"><\/span>4. Zip each files into a separate archive with SSIS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>It is also possible to dynamically compress all the files in a folder without knowing the name. In this case, use the extension of the source file or a filter on the name of the files to be processed. In this simple example, only the name of the file to be compressed is stored in a variable, as well as the timestamp, i.e., the date and time. <\/p>\n\n\n\n<p>The aim is to create, for example, an archive for each file, while keeping the original name. This is done by integrating the SSIS process execution task into a file loop, the same principle that is used to <a href=\"https:\/\/expert-only.com\/en\/ssis\/import-multiple-text-files-with-ssis\/\">import CSV files into a SQL database dynamically<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"41-set-up-the-loop-and-create-two-variables\"><\/span>4.1 Set-up the loop and create two variables<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Into the control flow, add a Foreach Loop Container, and add an Execute Process Task inside the loop.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"380\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-1-add-execute-process-task.jpg\" alt=\"Add the SSIS Foreach Loop Container and the Execute Process Task\" class=\"wp-image-13302\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-1-add-execute-process-task.jpg 640w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-1-add-execute-process-task-300x178.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption class=\"wp-element-caption\">Add the SSIS Foreach Loop Container and the Execute Process Task<\/figcaption><\/figure><\/div>\n\n\n<p>Create two SSIS variables to dynamically store the name of the file to be compressed, and the current date and time to manage the automatic time stamp in the ZIP file name. To display the variables, right-click on the package workspace and select Variables.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>FlatFilePath<\/strong> : variable used from the loop on files and passed to the SSIS compression task : indicate as hard value : file<\/li>\n\n\n\n<li><strong>TimeStamp<\/strong> : variable created with an expression to dynamically generate a Timestamp, its formula is the following, it will be used later in the tutorial<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"visualbasic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\"\" + LEFT( REPLACE( REPLACE( REPLACE( (DT_WSTR,30) GETDATE(), \"-\", \"\"), \":\", \"\"), \" \", \"\"), 15)<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"200\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-2-create-two-variables.jpg\" alt=\"Create 2 SSIS variables to manage the name of the text files to compress\" class=\"wp-image-13310\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-2-create-two-variables.jpg 780w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-2-create-two-variables-300x77.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-2-create-two-variables-768x197.jpg 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><figcaption class=\"wp-element-caption\">Create 2 SSIS variables to manage the name of the text files to compress<\/figcaption><\/figure><\/div>\n\n\n<p>Configure the loop with the Foreach File Enumerator component. Open the container and set it up like this:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Choose the type: <strong>Foreach File Enumerator<\/strong><\/li>\n\n\n\n<li>Specify the working folder: <strong>C:\\data<\/strong><\/li>\n\n\n\n<li>Write the filter to select CSV extensions only: <strong>*.csv<\/strong><\/li>\n\n\n\n<li>Choose the option to save the file name without the extension: <strong>Name only<\/strong><\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"631\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-3-configure-csv-files-loop.jpg\" alt=\"Configure Foreach File loop on the CSV files to compress with 7zip\" class=\"wp-image-13332\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-3-configure-csv-files-loop.jpg 737w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-3-configure-csv-files-loop-300x257.jpg 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><figcaption class=\"wp-element-caption\">Configure Foreach File Enumerator loop on the CSV files to compress with 7zip<\/figcaption><\/figure><\/div>\n\n\n<p>Now map the filename value from the loop to the variable. This is the most important step as it is this link between the loop and the SSIS task that makes the package dynamic.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"606\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-4-map-variable-in-loop.jpg\" alt=\"Map the SSIS FlatFilePath variable to the filename value\" class=\"wp-image-13361\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-4-map-variable-in-loop.jpg 726w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-4-map-variable-in-loop-300x250.jpg 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><figcaption class=\"wp-element-caption\">Map the SSIS FlatFilePath variable to the filename value<\/figcaption><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"42-configure-the-process-execution-task-to-call-7zip\"><\/span>4.2 Configure the process execution task to call 7zip<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Open the SSIS task to run the processes and set only the two arguments like this. The arguments field remains empty, to be set in the next step.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Executable: <strong>C:\\Program Files\\7-Zip\\7z.exe<\/strong><\/li>\n\n\n\n<li>WorkingDirectory: <strong>C:\\data<\/strong><\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"631\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-5-configure-process-task.jpg\" alt=\"Configure the SSIS task without the dynamically managed compression arguments\" class=\"wp-image-13374\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-5-configure-process-task.jpg 737w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-5-configure-process-task-300x257.jpg 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><figcaption class=\"wp-element-caption\">Configure the SSIS task without the dynamically managed compression arguments<\/figcaption><\/figure><\/div>\n\n\n<p>Then, from the Expressions tab, select arguments from the drop-down list and fill in this formula. This formula indicates that each detected file is compressed into a zip archive with the same name as the original file. <em>Customers_Data_1.csv<\/em> thus becomes <em>Customers_Data_1.zip<\/em>.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\" a \" + @[User::FlatFilePath] + \".zip \" + @[User::FlatFilePath] + \".csv\"<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"631\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-6-setup-arguments-from-variable.jpg\" alt=\"Build the Arguments expression with the filename variable\" class=\"wp-image-13387\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-6-setup-arguments-from-variable.jpg 737w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-6-setup-arguments-from-variable-300x257.jpg 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><figcaption class=\"wp-element-caption\">Build the Arguments expression with the filename variable<\/figcaption><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"43-run-the-package-to-zip-the-files\"><\/span>4.3 Run the package to zip the files<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Finally, run the package to compress each file into a ZIP archive.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-7-execute-loop-on-files.jpg\" alt=\"Run the SSIS package to compress each file into an archive with the same name\" class=\"wp-image-13400\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-7-execute-loop-on-files.jpg 640w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-7-execute-loop-on-files-300x169.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption class=\"wp-element-caption\">Run the SSIS package to compress each file into an archive with the same name<\/figcaption><\/figure><\/div>\n\n\n<p>The result after compression is a ZIP file for each text file in the folder.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"260\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-8-result-zipped-files.jpg\" alt=\"Compressed files after the package execution\" class=\"wp-image-13404\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-8-result-zipped-files.jpg 600w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-8-result-zipped-files-300x130.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><figcaption class=\"wp-element-caption\">Compressed files after the package execution<\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5-compress-and-add-current-time-to-archive-names\"><\/span>5. Compress and add current time to archive names<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>On the other hand, to compress the same files and change the name with the current date and time, now use the second variable. Edit the <strong><em>Arguments<\/em><\/strong> expression of the task again and simply add the dynamic <strong><em>TimeStamp<\/em><\/strong> variable as follows to add the suffix:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\" a \" + @[User::FlatFilePath] + @[User::TimeStamp] + \".zip \" + @[User::FlatFilePath] + \".csv\"<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"561\" height=\"503\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-9-set-up-zip-name-with-timestamp.jpg\" alt=\"Use a dynamic SSIS expression to add the date and time to the ZIP file\" class=\"wp-image-13414\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-9-set-up-zip-name-with-timestamp.jpg 561w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-9-set-up-zip-name-with-timestamp-300x269.jpg 300w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><figcaption class=\"wp-element-caption\">Use a dynamic SSIS expression to add the date and time to the ZIP file<\/figcaption><\/figure><\/div>\n\n\n<p>The result after a second execution of the package is the following, for example the Customers_Data_1.csv file is compressed in the Customers_Data_1_20221018_104229.zip archive. The format used is the date format YYYYMMDD_HHMMSS.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"320\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-10-result-zipped-files-timestamp.jpg\" alt=\"Zip archive with current date and time generated by SSIS and 7-zip\" class=\"wp-image-13422\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-10-result-zipped-files-timestamp.jpg 640w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/10\/ssis-zip-csv-foreach-file-10-result-zipped-files-timestamp-300x150.jpg 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption class=\"wp-element-caption\">Zip archive with current date and time generated by SSIS and 7-zip<\/figcaption><\/figure><\/div>\n\n\n<p>As per the screenshot above, the package generates 3 zip archives, i.e., one archive per CSV available in the folder.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6-display-the-list-of-all-7zip-options\"><\/span>6. Display the list of all 7zip options<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In addition, the full list of 7zip commands and options is available at the command line. To do this, type 7z-h inside an MS-DOS window. Here is the list of all 7zip options.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">7z-h<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"conclusion-on-zipping-files-with-ssis\"><\/span>Conclusion on zipping files with SSIS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In conclusion, this tutorial explains how to compress files in ZIP format with SSIS, Visual Studio and 7zip called from the command line. Other options are also possible such as storing folder names in variables. It is also possible to manage and deploy SSIS packages from the command line.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-sql-and-it-tutorials wp-block-embed-sql-and-it-tutorials\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"jLHHbFh2sZ\"><a href=\"https:\/\/expert-only.com\/en\/ssis\/import-xml-file-into-a-table-with-ssis\/\">Import an XML file into a SQL table with SSIS<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Import an XML file into a SQL table with SSIS&#8221; &#8212; SQL and IT Tutorials\" src=\"https:\/\/expert-only.com\/en\/ssis\/import-xml-file-into-a-table-with-ssis\/embed\/#?secret=CJLJRauZ8y#?secret=jLHHbFh2sZ\" data-secret=\"jLHHbFh2sZ\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Manage text files with SSIS <\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/expert-only.com\/en\/ssis\/import-csv-file-into-sql-server-with-ssis\/\">Import a CSV file into MS SQL with SSIS<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expert-only.com\/en\/ssis\/export-sql-data-in-csv-with-ssis\/\">Export SQL Server data into a CSV file<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expert-only.com\/en\/ssis\/import-multiple-text-files-with-ssis\/\">Import multiple CSV text files with SSIS<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expert-only.com\/en\/ssis\/import-xml-file-into-a-table-with-ssis\/\">Import an XML file into SQL Server with SSIS<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Tutorial to zip files and folders into compressed archives with SSIS and the 7zip software. First, to zip files with SSIS without script, we need to use the 7zip software in addition to the native components. Indeed, several options <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/\" title=\"Zip files with SSIS and 7zip\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":10829,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[516],"tags":[417],"class_list":{"0":"post-14937","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ssis","8":"tag-file"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.7 (Yoast SEO v26.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Zip files with SSIS and 7zip - Integration Services<\/title>\n<meta name=\"description\" content=\"Use Visual Studio and 7zip to zip files and folders into archives with SSIS and free up disk space from Windows servers or laptops.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Zip files with SSIS and 7zip\" \/>\n<meta property=\"og:description\" content=\"Use Visual Studio and 7zip to zip files and folders into archives with SSIS and free up disk space from Windows servers or laptops.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL and IT Tutorials\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-17T05:41:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-09T15:58:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pocket-watch-on-black-46ECE144EB3_1920x1080.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Expert-Only\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@expert_only\" \/>\n<meta name=\"twitter:site\" content=\"@expert_only\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Expert-Only\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/\"},\"author\":{\"name\":\"Expert-Only\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\"},\"headline\":\"Zip files with SSIS and 7zip\",\"datePublished\":\"2022-10-17T05:41:00+00:00\",\"dateModified\":\"2022-11-09T15:58:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/\"},\"wordCount\":1592,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pocket-watch-on-black-46ECE144EB3_1920x1080.jpg\",\"keywords\":[\"File\"],\"articleSection\":[\"SSIS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/\",\"url\":\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/\",\"name\":\"Zip files with SSIS and 7zip - Integration Services\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pocket-watch-on-black-46ECE144EB3_1920x1080.jpg\",\"datePublished\":\"2022-10-17T05:41:00+00:00\",\"dateModified\":\"2022-11-09T15:58:22+00:00\",\"description\":\"Use Visual Studio and 7zip to zip files and folders into archives with SSIS and free up disk space from Windows servers or laptops.\",\"breadcrumb\":{\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#primaryimage\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pocket-watch-on-black-46ECE144EB3_1920x1080.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pocket-watch-on-black-46ECE144EB3_1920x1080.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"en\",\"item\":\"https:\/\/expert-only.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Zip files with SSIS and 7zip\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/expert-only.com\/en\/#website\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"name\":\"SQL and IT Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/expert-only.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/expert-only.com\/en\/#organization\",\"name\":\"Expert-Only\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"width\":381,\"height\":174,\"caption\":\"Expert-Only\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\",\"https:\/\/x.com\/expert_only\",\"https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\",\"name\":\"Expert-Only\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"caption\":\"Expert-Only\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Zip files with SSIS and 7zip - Integration Services","description":"Use Visual Studio and 7zip to zip files and folders into archives with SSIS and free up disk space from Windows servers or laptops.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/","og_locale":"en_US","og_type":"article","og_title":"Zip files with SSIS and 7zip","og_description":"Use Visual Studio and 7zip to zip files and folders into archives with SSIS and free up disk space from Windows servers or laptops.","og_url":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/","og_site_name":"SQL and IT Tutorials","article_publisher":"https:\/\/www.facebook.com\/ExpertOnlyCom\/","article_published_time":"2022-10-17T05:41:00+00:00","article_modified_time":"2022-11-09T15:58:22+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pocket-watch-on-black-46ECE144EB3_1920x1080.jpg","type":"image\/jpeg"}],"author":"Expert-Only","twitter_card":"summary_large_image","twitter_creator":"@expert_only","twitter_site":"@expert_only","twitter_misc":{"Written by":"Expert-Only","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#article","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/"},"author":{"name":"Expert-Only","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef"},"headline":"Zip files with SSIS and 7zip","datePublished":"2022-10-17T05:41:00+00:00","dateModified":"2022-11-09T15:58:22+00:00","mainEntityOfPage":{"@id":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/"},"wordCount":1592,"commentCount":2,"publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"image":{"@id":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pocket-watch-on-black-46ECE144EB3_1920x1080.jpg","keywords":["File"],"articleSection":["SSIS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/","url":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/","name":"Zip files with SSIS and 7zip - Integration Services","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#primaryimage"},"image":{"@id":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pocket-watch-on-black-46ECE144EB3_1920x1080.jpg","datePublished":"2022-10-17T05:41:00+00:00","dateModified":"2022-11-09T15:58:22+00:00","description":"Use Visual Studio and 7zip to zip files and folders into archives with SSIS and free up disk space from Windows servers or laptops.","breadcrumb":{"@id":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#primaryimage","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pocket-watch-on-black-46ECE144EB3_1920x1080.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/09\/pocket-watch-on-black-46ECE144EB3_1920x1080.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/expert-only.com\/en\/ssis\/zip-files-with-ssis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"en","item":"https:\/\/expert-only.com\/en\/"},{"@type":"ListItem","position":2,"name":"Zip files with SSIS and 7zip"}]},{"@type":"WebSite","@id":"https:\/\/expert-only.com\/en\/#website","url":"https:\/\/expert-only.com\/en\/","name":"SQL and IT Tutorials","description":"","publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/expert-only.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/expert-only.com\/en\/#organization","name":"Expert-Only","url":"https:\/\/expert-only.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","width":381,"height":174,"caption":"Expert-Only"},"image":{"@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ExpertOnlyCom\/","https:\/\/x.com\/expert_only","https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA"]},{"@type":"Person","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef","name":"Expert-Only","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","caption":"Expert-Only"}}]}},"_links":{"self":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/14937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/comments?post=14937"}],"version-history":[{"count":0,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/14937\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media\/10829"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media?parent=14937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/categories?post=14937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/tags?post=14937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}