<?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 Illegal characters in ZIP in Digital Exchange</title>
    <link>https://community.blueprism.com/t5/Digital-Exchange/Illegal-characters-in-ZIP/m-p/62847#M2446</link>
    <description>&lt;P&gt;Greetings,&lt;/P&gt;
&lt;P&gt;Is there any way to rename files in ZIP ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When we tried to extract from ZIP to Folder we get an error msg : &lt;SPAN&gt;Could not execute code stage because exception thrown by code stage: Illegal characters in path.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Later we found the file, the filename started with the "_" character. Or how can i extract files with special characters in file name?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One more thing, when we extract from ZIP manually there is no problem, but when with BP it's throwing error msg. Or when the BP successfully extract from ZIP , we get file names like "&lt;SPAN&gt;cn� spr�" ,the original name was "cná sprá".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Peter Vígh&lt;BR /&gt;------------------------------&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 May 2022 10:58:00 GMT</pubDate>
    <dc:creator>PeterVígh</dc:creator>
    <dc:date>2022-05-25T10:58:00Z</dc:date>
    <item>
      <title>Illegal characters in ZIP</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Illegal-characters-in-ZIP/m-p/62847#M2446</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;
&lt;P&gt;Is there any way to rename files in ZIP ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When we tried to extract from ZIP to Folder we get an error msg : &lt;SPAN&gt;Could not execute code stage because exception thrown by code stage: Illegal characters in path.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Later we found the file, the filename started with the "_" character. Or how can i extract files with special characters in file name?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One more thing, when we extract from ZIP manually there is no problem, but when with BP it's throwing error msg. Or when the BP successfully extract from ZIP , we get file names like "&lt;SPAN&gt;cn� spr�" ,the original name was "cná sprá".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Peter Vígh&lt;BR /&gt;------------------------------&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 10:58:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Illegal-characters-in-ZIP/m-p/62847#M2446</guid>
      <dc:creator>PeterVígh</dc:creator>
      <dc:date>2022-05-25T10:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: Illegal characters in ZIP</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Illegal-characters-in-ZIP/m-p/62848#M2447</link>
      <description>Hello Peter,&lt;BR /&gt;&lt;BR /&gt;Which Utility are you using to unzip files?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;If I was of assistance, please vote for it to be the "Best Answer".&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Tejaskumar Darji&lt;BR /&gt;Sr. Consultant-Technical Lead&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 25 May 2022 13:47:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Illegal-characters-in-ZIP/m-p/62848#M2447</guid>
      <dc:creator>Tejaskumar_Darji</dc:creator>
      <dc:date>2022-05-25T13:47:00Z</dc:date>
    </item>
    <item>
      <title>RE: Illegal characters in ZIP</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Illegal-characters-in-ZIP/m-p/62849#M2448</link>
      <description>Hi Peter,&lt;BR /&gt;&lt;BR /&gt;I checked the same from the latest DX Exchange asset and it seems to work properly for me but with those special characters which you mentioned:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8348.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8523i7455858D19EE910B/image-size/large?v=v2&amp;amp;px=999" role="button" title="8348.png" alt="8348.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Try downloading the latest asset from here:&amp;nbsp; &lt;A href="https://digitalexchange.blueprism.com/dx/entry/3439/solution/utility---windows-compressed-file-2" target="_blank" rel="noopener"&gt;Windows Compressed File&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;----------------------------------&lt;BR /&gt;Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Devneet Mohanty&lt;BR /&gt;Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,&lt;BR /&gt;WonderBotz India Pvt. Ltd.&lt;BR /&gt;Blue Prism Community MVP | Blue Prism 7x Certified Professional&lt;BR /&gt;Website: &lt;A href="https://devneet.github.io/" target="test_blank"&gt;https://devneet.github.io/&lt;/A&gt;&lt;BR /&gt;Email: devneetmohanty07@gmail.com&lt;BR /&gt;&lt;BR /&gt;----------------------------------&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 25 May 2022 14:01:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Illegal-characters-in-ZIP/m-p/62849#M2448</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2022-05-25T14:01:00Z</dc:date>
    </item>
    <item>
      <title>RE: Illegal characters in ZIP</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Illegal-characters-in-ZIP/m-p/62850#M2449</link>
      <description>&lt;P&gt;Hello guys,&lt;/P&gt;
&lt;P&gt;I tried the updated version of the Windows Compressed File utility, still have the same issue.&lt;/P&gt;
&lt;P&gt;So the file name is : _fileName.docx - still getting the same error msg.&lt;BR /&gt;Is there any way to change the file name in ZIP?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Peter Vígh&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 26 May 2022 10:32:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Illegal-characters-in-ZIP/m-p/62850#M2449</guid>
      <dc:creator>PeterVígh</dc:creator>
      <dc:date>2022-05-26T10:32:00Z</dc:date>
    </item>
    <item>
      <title>RE: Illegal characters in ZIP</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Illegal-characters-in-ZIP/m-p/62851#M2450</link>
      <description>Hi Peter,&lt;BR /&gt;&lt;BR /&gt;Sorry for the late reply as I got occupied with some of my personal errands for last few days. As per your requirement, if I am correct you are looking for a way to rename the file entries within the zip file even before extracting the data onto a folder. If that is the requirement, then I think the current utility which Blue Prism has can't be used as '&lt;STRONG&gt;Utility - Windows Compressed File&lt;/STRONG&gt;' uses '&lt;STRONG&gt;System.IO.Compression&lt;/STRONG&gt;' namespace which can't allow to make any changes to the entry names as they are of read only type.&lt;BR /&gt;&lt;BR /&gt;However, you can use the '&lt;STRONG&gt;DotNetZip&lt;/STRONG&gt;' package which can be installed/downloaded from the following Nuget package location: &lt;A href="https://www.nuget.org/packages/DotNetZip" target="_blank" rel="noopener"&gt;DotNetZip Nuget Package&amp;nbsp;&lt;/A&gt; and copy the highlighted file into Blue Prism installation folder as shown below:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8352.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8528i18B7B1504632F247/image-size/large?v=v2&amp;amp;px=999" role="button" title="8352.png" alt="8352.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8353.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8527i90B358A37610BD8C/image-size/large?v=v2&amp;amp;px=999" role="button" title="8353.png" alt="8353.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;This DLL internally uses &lt;STRONG&gt;'System.IO.Compression'&lt;/STRONG&gt; and&lt;STRONG&gt; 'Ionic.Zip'&lt;/STRONG&gt; utilities. In order to now use it inside Blue Prism, you can create a new object and give it a suitable name. In my case the name of the object is &lt;STRONG&gt;'Utility - Windows Compressed File Extended'&amp;nbsp;&lt;/STRONG&gt;and in the '&lt;STRONG&gt;Initialise&lt;/STRONG&gt;' page, under page description stage you need to add the following '&lt;STRONG&gt;External References&lt;/STRONG&gt;' : &lt;CODE&gt;DotNetZip.dll&lt;/CODE&gt; and the following '&lt;STRONG&gt;Namespace Import&lt;/STRONG&gt;': &lt;CODE&gt;Ionic.Zip.&lt;/CODE&gt; Also, ensure that the language chosen is &lt;CODE&gt;'Visual Basic'&lt;/CODE&gt; as shown below:&lt;CODE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8354.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8532iD9344DE0054CA7ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="8354.png" alt="8354.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/CODE&gt;Now, add a new action called as &lt;STRONG&gt;'Rename Zip Entries'&amp;nbsp;&lt;/STRONG&gt;and add the below input and output parameters:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Input Parameters:&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;- Zip File Path (Text) : The file path of the zip file where the modification to the entries need to be performed.&lt;BR /&gt;&lt;BR /&gt;- Entry Names (Collection) : The entry names collection consisting of the original names and the modified names.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - Original Name (Text) : This field consists of the original name of the file entry inside the zip archive which you want to rename.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - Modified Name (Text) : This field consists of the name to which the file entry inside the zip archive needs to be renamed into.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Output Parameters:&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;- Message (Text) : The message text displaying any file entries not being found in the zip archive.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8355.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8534i4F649FAA693956A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="8355.png" alt="8355.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Now, add a code stage called '&lt;STRONG&gt;Rename Zip Entries&lt;/STRONG&gt;' with the below parameters:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8356.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8531i2A637E7376201AC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="8356.png" alt="8356.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Code:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8357.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8535iFD3EDACB6DA7BB83/image-size/large?v=v2&amp;amp;px=999" role="button" title="8357.png" alt="8357.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;
&lt;PRE class="language-vbnet"&gt;&lt;CODE&gt;Dim zipFile As ZipFile = ZipFile.Read(Zip_File_Path)
Dim entryExists As Boolean


For Each row As System.Data.DataRow In Entry_Names.Rows

	entryExists = False

	For i = 0 To zipFile.Count-1

		If zipFile(i).FileName.Equals(CStr(row("Original Name"))) Then
	
			zipFile(i).FileName = CStr(row("Modified Name"))
			entryExists = True
			Exit For		
		
		End If

	Next

	'Validate if the entry was not found in the zip file

	If entryExists = False Then
	
		If Message.Equals(String.Empty) Then
		
			Message = "The current zip entry does not exists in the provided zip file path: " + Environment.NewLine() + Environment.NewLine() + CStr(row("Original Name"))

		Else

			Message = Message + Environment.NewLine() + CStr(row("Original Name"))

		End If

	End If

Next


zipFile.Comment = "This archive has been modified at the following date: " + Now.ToString()
zipFile.Save()&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;Now, you can publish the action and test it from Process Studio. For my test scenario, I have take the below zip file which consists of two file entries - &lt;STRONG&gt;'Input.xlsx'&lt;/STRONG&gt; and &lt;STRONG&gt;'Split Columns From Excel.bprelease'&lt;/STRONG&gt; :&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8358.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8529i0D58764155F0055A/image-size/large?v=v2&amp;amp;px=999" role="button" title="8358.png" alt="8358.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8359.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8530iF1017ECF870E0B8B/image-size/large?v=v2&amp;amp;px=999" role="button" title="8359.png" alt="8359.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now, my input zip file path parameter will have the file path of this zip file whereas the entry names collection parameter will have three entries out of which two rows consists of the valid file names which are available within my zip file and the last row consists of an invalid file entry that does not exists within my zip file as shown below:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8360.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8533iB19B9CEB17B44B7D/image-size/large?v=v2&amp;amp;px=999" role="button" title="8360.png" alt="8360.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Now, once I execute the workflow below output is what I get:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8361.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8540iF7DAEA0EEE7FB09B/image-size/large?v=v2&amp;amp;px=999" role="button" title="8361.png" alt="8361.png" /&gt;&lt;/span&gt;&lt;BR /&gt;For the last entry, I got the error message in my message output as it does not exists, however for the other two entries my zip archive looks as below now:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="8362.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/8542i4CFB1259BCD233F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="8362.png" alt="8362.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;This action will help you to rename any file entry within a specified zip file as long as you provide the correct file entry name and the name that needs to be used for renaming the file entry in the proper format as shown above.&lt;BR /&gt;------------------------------&lt;BR /&gt;----------------------------------&lt;BR /&gt;Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Devneet Mohanty&lt;BR /&gt;Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,&lt;BR /&gt;WonderBotz India Pvt. Ltd.&lt;BR /&gt;Blue Prism Community MVP | Blue Prism 7x Certified Professional&lt;BR /&gt;Website: &lt;A href="https://devneet.github.io/" target="test_blank"&gt;https://devneet.github.io/&lt;/A&gt;&lt;BR /&gt;Email: devneetmohanty07@gmail.com&lt;BR /&gt;&lt;BR /&gt;----------------------------------&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 30 May 2022 00:22:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Illegal-characters-in-ZIP/m-p/62851#M2450</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2022-05-30T00:22:00Z</dc:date>
    </item>
  </channel>
</rss>

