{"id":9901,"date":"2023-03-27T11:47:11","date_gmt":"2023-03-27T11:47:11","guid":{"rendered":"https:\/\/zappysys.com\/blog\/?p=9901"},"modified":"2023-03-27T11:47:11","modified_gmt":"2023-03-27T11:47:11","slug":"how-to-save-a-list-of-files-into-a-table-using-ssis","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/","title":{"rendered":"How to save a list of files into a table using SSIS."},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>In this post, we will show how to save a list of files into a table a table using SSIS. The article will show how to get a list of files and then store the list of files into an Excel file.<\/p>\n<h2><strong>Prerequisites<\/strong><\/h2>\n<p>Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:<\/p>\n<ol>\n<li>SSIS designer installed. Sometimes it is referred to as BIDS or SSDT (<a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/ssdt\/download-sql-server-data-tools-ssdt?view=sql-server-ver16\">download it from the Microsoft site<\/a>).<\/li>\n<li>Basic knowledge of SSIS package development using Microsoft SQL Server Integration Services.<\/li>\n<li>Make sure <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/\">ZappySys SSIS PowerPack<\/a> is installed (<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/download\/\">download it<\/a>).<\/li>\n<li>Optional (If you want to Deploy and Schedule ) &#8211; <a href=\"https:\/\/zappysys.zendesk.com\/hc\/en-us\/articles\/360035974593\">Deploy and Schedule SSIS Packages<\/a><\/li>\n<\/ol>\n<h2><strong>Step-by-step process to save the list of files and folders into an article<\/strong><\/h2>\n<h3>Save the information in a variable with the Advanced file system task<\/h3>\n<p>1. Drag and drop the Advance File System Task from the SSIS toolbox, chose to Get file list as ADO.net Data table and select an object variable type<\/p>\n<div id=\"attachment_9951\" style=\"width: 596px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9951\" class=\"wp-image-9951 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1.png\" alt=\"Advanced file system task 1\" width=\"586\" height=\"593\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1.png 586w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1-296x300.png 296w\" sizes=\"(max-width: 586px) 100vw, 586px\" \/><\/a><p id=\"caption-attachment-9951\" class=\"wp-caption-text\">Getting the file list in a variable<\/p><\/div>\n<h3>Save the result in a file with Logging task in order to\u00a0save a list of files into a table<\/h3>\n<p>2. The next step is to save the result in a HTML file: select the file destination, uncheck append and prefix datetime. Select the file in log mode and none in message type, and insert the variable in the message as follows:<\/p>\n<div id=\"attachment_9953\" style=\"width: 546px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/lt1-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9953\" class=\"wp-image-9953 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/lt1-1.png\" alt=\"save a list of files into a table - Logging task configuration\" width=\"536\" height=\"473\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/lt1-1.png 536w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/lt1-1-300x265.png 300w\" sizes=\"(max-width: 536px) 100vw, 536px\" \/><\/a><p id=\"caption-attachment-9953\" class=\"wp-caption-text\">Save the value from the variable in a file without a prefix<\/p><\/div>\n<div class=\"mceTemp\"><\/div>\n<h3>Read the table and save it on a new file in order to\u00a0save a list of files into a table<\/h3>\n<p>3. Now, Drag and Drop SSIS\u00a0<b>Data Flow Task<\/b>\u00a0from SSIS Toolbox<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/zappysys.com\/onlinehelp\/ssis-powerpack\/scr\/images\/drag-and-drop-data-flow-task.png\" width=\"460\" height=\"155\" \/><\/p>\n<p>4. Double click on the DataFlow task to see DataFlow designer surface.<\/p>\n<p>5. From the SSIS toolbox drag and drop HTML source and insert the path for the new file, you can preview the file if it was previously created.<\/p>\n<div id=\"attachment_9954\" style=\"width: 811px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/htmls1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9954\" class=\"wp-image-9954 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/htmls1.png\" alt=\"save a list of files into a table - HTML Source configuration\" width=\"801\" height=\"593\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/htmls1.png 801w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/htmls1-300x222.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/htmls1-768x569.png 768w\" sizes=\"(max-width: 801px) 100vw, 801px\" \/><\/a><p id=\"caption-attachment-9954\" class=\"wp-caption-text\">Preview the HTML file<\/p><\/div>\n<p>7. Then you can use a destination like the <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-excel-file-destination\/\">Excel destination<\/a>, <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-json-file-destination-connector\/\">JSON destination<\/a> or <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/ssis-csv-file-destination\/\">CSV destination<\/a><\/p>\n<div id=\"attachment_9955\" style=\"width: 268px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/dataflow1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9955\" class=\"wp-image-9955 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/dataflow1.png\" alt=\"save a list of files into a table - Save from HTML table into Excel\" width=\"258\" height=\"298\" \/><\/a><p id=\"caption-attachment-9955\" class=\"wp-caption-text\">Save the path list into an excel file<\/p><\/div>\n<p>If everything is OK, the information will be stored in Excel. However, you can select any destination.<\/p>\n<h2>Conclusion<\/h2>\n<p>In this article, we show how to save a list of files in a table. Basically, we use the Advanced file system to save the list in a file. We use the Logging Task<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this post, we will show how to save a list of files into a table a table using SSIS. The article will show how to get a list of files and then store the list of files into an Excel file. Prerequisites Before we perform the steps listed in this article, you will [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":9951,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[611,79],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>How to save a list of files into a table using SSIS. | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"In this article, we will show hot to save a list of files into a Table using SQL Server Integration Services and the SSIS Powerpack\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to save a list of files into a table using SSIS. | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"In this article, we will show hot to save a list of files into a Table using SQL Server Integration Services and the SSIS Powerpack\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:published_time\" content=\"2023-03-27T11:47:11+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"586\" \/>\r\n\t<meta property=\"og:image:height\" content=\"593\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys Team\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/\",\"url\":\"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/\",\"name\":\"How to save a list of files into a table using SSIS. | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1.png\",\"datePublished\":\"2023-03-27T11:47:11+00:00\",\"dateModified\":\"2023-03-27T11:47:11+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e\"},\"description\":\"In this article, we will show hot to save a list of files into a Table using SQL Server Integration Services and the SSIS Powerpack\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1.png\",\"width\":586,\"height\":593,\"caption\":\"Getting all files path in a variable\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to save a list of files into a table using SSIS.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e\",\"name\":\"ZappySys Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g\",\"caption\":\"ZappySys Team\"},\"sameAs\":[\"https:\/\/zappysys.com\"],\"url\":\"https:\/\/zappysys.com\/blog\/author\/dcalbimonte\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to save a list of files into a table using SSIS. | ZappySys Blog","description":"In this article, we will show hot to save a list of files into a Table using SQL Server Integration Services and the SSIS Powerpack","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:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/","og_locale":"en_US","og_type":"article","og_title":"How to save a list of files into a table using SSIS. | ZappySys Blog","og_description":"In this article, we will show hot to save a list of files into a Table using SQL Server Integration Services and the SSIS Powerpack","og_url":"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/","og_site_name":"ZappySys Blog","article_published_time":"2023-03-27T11:47:11+00:00","og_image":[{"width":586,"height":593,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1.png","type":"image\/png"}],"author":"ZappySys Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ZappySys Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/","url":"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/","name":"How to save a list of files into a table using SSIS. | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1.png","datePublished":"2023-03-27T11:47:11+00:00","dateModified":"2023-03-27T11:47:11+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e"},"description":"In this article, we will show hot to save a list of files into a Table using SQL Server Integration Services and the SSIS Powerpack","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/02\/afst1-1.png","width":586,"height":593,"caption":"Getting all files path in a variable"},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/how-to-save-a-list-of-files-into-a-table-using-ssis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to save a list of files into a table using SSIS."}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e","name":"ZappySys Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g","caption":"ZappySys Team"},"sameAs":["https:\/\/zappysys.com"],"url":"https:\/\/zappysys.com\/blog\/author\/dcalbimonte\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/9901"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=9901"}],"version-history":[{"count":15,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/9901\/revisions"}],"predecessor-version":[{"id":10013,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/9901\/revisions\/10013"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/9951"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=9901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=9901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=9901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}