<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic The solution previously in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56821#M10928</link>
    <description>The solution previously provided works in instances where you want to zip all the contents of a particular directory.  If you want to zip select files from a directory you could do the following:
In below example following are inputs to a code stage
  Source_Files_Directory (Text - Path to directory containing files to be zipped)
  Source_Files_Collection (Collection - Single text column called ""Source_File"" to store list of files to be zipped)
  Zip_Archive_Directory (Text - Path to directory where zip file will be created)
  Zip_Archive_Name (Text - Name of zip file)
In addition to the external references already noted this requires the following to use FileStream for creating the empty zip archive file:
  System.IO.Compression.FileSystem.dll
		'Create empty zip archive
		Dim FileStream as FileStream = new FileStream(Zip_Archive_Directory &amp;amp; Zip_Archive_Name, FileMode.Create)
		FileStream.Close()
		'Add files to zip archive
		Using archive As ZipArchive = ZipFile.Open(Zip_Archive_Directory &amp;amp; Zip_Archive_Name, ZipArchiveMode.Update)
			For Each r as System.Data.DataRow In Source_Files_Collection.Rows
				If System.IO.File.Exists(Source_Files_Directory &amp;amp; CStr(r(""Source_File""))) Then
					Archive.CreateEntryFromFile(Source_Files_Directory &amp;amp; CStr(r(""Source_File"")), CStr(r(""Source_File"")), CompressionLevel.Fastest)
				End If
			Next
		End Using</description>
    <pubDate>Thu, 15 Jun 2017 21:49:00 GMT</pubDate>
    <dc:creator>EdBonk</dc:creator>
    <dc:date>2017-06-15T21:49:00Z</dc:date>
    <item>
      <title>Creating/Moving files to a ZIP Folder</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56813#M10920</link>
      <description>I am able to create a ZIP Folder using the Write Text File action from Utilities - File Management and giving the file extension ".zip" but once created I can not find a way to move or copy existing files into it.

Anyone have a code solution to this?

Cheers</description>
      <pubDate>Wed, 31 May 2017 15:26:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56813#M10920</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-31T15:26:00Z</dc:date>
    </item>
    <item>
      <title>That won't work, the file you</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56814#M10921</link>
      <description>That won't work, the file you've created is not a zip file, it's a text file with a different extension. You need an app like WinZip or 7zip to create a zip file - both these apps have a command line interface that you can execute using the Utility - Environment object.</description>
      <pubDate>Wed, 31 May 2017 19:54:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56814#M10921</guid>
      <dc:creator>John__Carter</dc:creator>
      <dc:date>2017-05-31T19:54:00Z</dc:date>
    </item>
    <item>
      <title>It is very easy to create Zip</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56815#M10922</link>
      <description>It is very easy to create Zip files, if you add a custom code stage, whit these 3 lines of code you can generate zip files from a folder path
Dim startPath As String = dirToZip
Dim zipPath As String = zipFileName
ZipFile.CreateFromDirectory(startPath, zipPath, CompressionLevel.Fastest, False)
I hope it helps</description>
      <pubDate>Thu, 01 Jun 2017 03:16:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56815#M10922</guid>
      <dc:creator>MarioG</dc:creator>
      <dc:date>2017-06-01T03:16:00Z</dc:date>
    </item>
    <item>
      <title>Thanks for the reply and the</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56816#M10923</link>
      <description>Thanks for the reply and the code. I have pasted your code directly into a code stage and given it the two text inputs ""dirToZip"" and ""zipFileName"". I am however getting errors when I Check Code:
""Compile error at line 3: 'ZipFile' is not declared. It may be inaccessible due to its protection level.""
""Compile error at line 3: 'CompressionLevel' is not declared. It may be inaccessible due to its protection level.""
Where am I going wrong?</description>
      <pubDate>Thu, 01 Jun 2017 16:22:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56816#M10923</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T16:22:00Z</dc:date>
    </item>
    <item>
      <title>Perhaps you need to import</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56817#M10924</link>
      <description>Perhaps you need to import certain Dll's or namespaces? @marioagv?</description>
      <pubDate>Thu, 01 Jun 2017 17:15:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56817#M10924</guid>
      <dc:creator>SébastienBulté</dc:creator>
      <dc:date>2017-06-01T17:15:00Z</dc:date>
    </item>
    <item>
      <title>I've fixed the issue myself</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56818#M10925</link>
      <description>I've fixed the issue myself my including the Namespaces System.IO.Compression and System.IO.Compression.FileZip.dll</description>
      <pubDate>Thu, 01 Jun 2017 17:17:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56818#M10925</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T17:17:00Z</dc:date>
    </item>
    <item>
      <title>I've fixed the issue myself</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56819#M10926</link>
      <description>I've fixed the issue myself by including the Namespaces System.IO.Compression and System.IO.Compression.FileZip.dll</description>
      <pubDate>Thu, 01 Jun 2017 17:17:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56819#M10926</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-01T17:17:00Z</dc:date>
    </item>
    <item>
      <title>Hi Team,</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56820#M10927</link>
      <description>Hi Team,
I have spyed the ""ol"" element in webpage and stored all ""li"" elements into one collection, here the collection contains only one column with header ""Item Text"".
Please suggest me how can I get each ""li"" item value in each loop iteration.
I tried like collectionname.Column1, it is not working.</description>
      <pubDate>Fri, 02 Jun 2017 10:15:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56820#M10927</guid>
      <dc:creator>UshaRani1</dc:creator>
      <dc:date>2017-06-02T10:15:00Z</dc:date>
    </item>
    <item>
      <title>The solution previously</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56821#M10928</link>
      <description>The solution previously provided works in instances where you want to zip all the contents of a particular directory.  If you want to zip select files from a directory you could do the following:
In below example following are inputs to a code stage
  Source_Files_Directory (Text - Path to directory containing files to be zipped)
  Source_Files_Collection (Collection - Single text column called ""Source_File"" to store list of files to be zipped)
  Zip_Archive_Directory (Text - Path to directory where zip file will be created)
  Zip_Archive_Name (Text - Name of zip file)
In addition to the external references already noted this requires the following to use FileStream for creating the empty zip archive file:
  System.IO.Compression.FileSystem.dll
		'Create empty zip archive
		Dim FileStream as FileStream = new FileStream(Zip_Archive_Directory &amp;amp; Zip_Archive_Name, FileMode.Create)
		FileStream.Close()
		'Add files to zip archive
		Using archive As ZipArchive = ZipFile.Open(Zip_Archive_Directory &amp;amp; Zip_Archive_Name, ZipArchiveMode.Update)
			For Each r as System.Data.DataRow In Source_Files_Collection.Rows
				If System.IO.File.Exists(Source_Files_Directory &amp;amp; CStr(r(""Source_File""))) Then
					Archive.CreateEntryFromFile(Source_Files_Directory &amp;amp; CStr(r(""Source_File"")), CStr(r(""Source_File"")), CompressionLevel.Fastest)
				End If
			Next
		End Using</description>
      <pubDate>Thu, 15 Jun 2017 21:49:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56821#M10928</guid>
      <dc:creator>EdBonk</dc:creator>
      <dc:date>2017-06-15T21:49:00Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56822#M10929</link>
      <description>Hi,
Is it somehow possible to retrieve file names when ZIP is extracted?
Thanks in advance!</description>
      <pubDate>Thu, 03 Aug 2017 18:41:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56822#M10929</guid>
      <dc:creator>RaivisLazdāns</dc:creator>
      <dc:date>2017-08-03T18:41:00Z</dc:date>
    </item>
    <item>
      <title>Hi,</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56823#M10930</link>
      <description>Hi,
Is it somehow possible to retrieve file names when ZIP is extracted?
Thanks in advance!</description>
      <pubDate>Thu, 03 Aug 2017 18:42:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56823#M10930</guid>
      <dc:creator>RaivisLazdāns</dc:creator>
      <dc:date>2017-08-03T18:42:00Z</dc:date>
    </item>
    <item>
      <title>The Utility - File Management</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56824#M10931</link>
      <description>The Utility - File Management VBO has an action which allows you to get the files inside a folder (in which you extracted the files for example).</description>
      <pubDate>Thu, 03 Aug 2017 20:03:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56824#M10931</guid>
      <dc:creator>SébastienBulté</dc:creator>
      <dc:date>2017-08-03T20:03:00Z</dc:date>
    </item>
    <item>
      <title>RE: Hi,</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56825#M10932</link>
      <description>Hi Ravi,&lt;BR /&gt;&lt;BR /&gt;Pls find following VBO &lt;A href="https://digitalexchange.blueprism.com/dx/entry/113833/solution/atcs---compression-and-extraction" target="_blank" rel="noopener"&gt;https://digitalexchange.blueprism.com/dx/entry/113833/solution/atcs---compression-and-extraction&lt;/A&gt;&lt;BR /&gt;which helps in Zip and Extract of files and &lt;A href="https://digitalexchange.blueprism.com/dx/entry/113833/solution/atcs---utility-file-management" target="test_blank"&gt;https://digitalexchange.blueprism.com/dx/entry/113833/solution/atcs---utility-file-management&lt;/A&gt; helps to get file details&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;vinod chinthakindi&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Sat, 22 May 2021 12:03:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Creating-Moving-files-to-a-ZIP-Folder/m-p/56825#M10932</guid>
      <dc:creator>vinodchinthakin</dc:creator>
      <dc:date>2021-05-22T12:03:00Z</dc:date>
    </item>
  </channel>
</rss>

