Zip and unzip files using Blueprism

LSK

New Member
Hi everyone,

I am trying to zip a file using Blurprism. Is it possible to perform Zip operation without Using Code stage? If possible how can it be done?
If not, what are prerequisites for the code stage?

Thanks in advance.
 

Sachin_Kharmale

Active Member
Yes we can do
Prerequisite:
Need
System.IO.Compression.FileSystem.dll file as refference to the VBO Object

Design Code Stage and give input as
1-source location
2- destination zip file location
3-zip file name.


Your flow Object will look like

View attachment 1561966220115.png

Use the bellow code in code stage
Dim ZipName As String
ZipName = DestinationPath &"\"& ZIPFileName
ZipFile.CreateFromDirectory(SourcePath,ZipName)

your code stage stage input look will be


View attachment 1561966278029.png
 

shiva2791

New Member
Hi
Hi everyone,

I am trying to zip a file using Blurprism. Is it possible to perform Zip operation without Using Code stage? If possible how can it be done?
If not, what are prerequisites for the code stage?

Thanks in advance.


Hi LSK,

I am telling this way, please explore and try once!

1. Through spying modes, right click on that file.
2. Then if the OS is Windows 8 or 10, there must be an option for zipping (7-zip).
3. Using that , you can add that file to Archive.rar or Archive.zip .
 

Attachments

  • Zipping File.jpg
    66.8 KB · Views: 217

juan.gl

New Member
hello, i have some issues with unziping fles with no extension, has anyone already have gone through this?

my current unzip code is just

ZipFile.ExtractToDirectory(zipFilePath,DextPath);

i have another version to delete entrys with special characters

using(ZipArchive archive = ZipFile.Open(zipFilePath,ZipArchiveMode.Update))
{
foreach(ZipArchiveEntry entry in archive.Entries)
{
if (entry.Name.Contains("?"))
{
entry.Delete();
}
}
archive.ExtractToDirectory(DextPath);
}

any idea of how can i address this issue? meybe renaming and adding an extension? any thought?
 
Top