Unzip files using ZP

djljzenno

Client
Регистрация
26.12.2013
Сообщения
43
Благодарностей
2
Баллы
8
Hello,

I am trying to unzip files to a certain location that I download as they are downloaded and then archive the zip to another location.

I am unable to find any examples of this on the forum.

Thanks!
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113
Код:
var zipPath = project.Variables["path1"].Value; // path to archive file
var extractPath = project.Variables["path2"].Value; //path to extract directory
System.IO.Compression.ZipFile.ExtractToDirectory(zipPath, extractPath);
 

jcknick

Client
Регистрация
10.05.2013
Сообщения
154
Благодарностей
9
Баллы
18
Tried and failed. In fact the project is failing to restart when I add the C# block with this code inside.



Also tried to follow this video - same results -


Help :-)

Btw, I'm trying to do it on localserver, if it matters.
 
Последнее редактирование:

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
526
Благодарностей
112
Баллы
43
Use this project in project, maybe help you.
Output path = Path
Zip = Zip file complete path

As example
Zip = C:\Temp\Zipfile.zip
Output path = C:\Users\Administrator\Desktop
 

Вложения

  • Спасибо
Реакции: LightWood

LightWood

Moderator
Регистрация
04.11.2010
Сообщения
2 382
Благодарностей
917
Баллы
113
Tried and failed. In fact the project is failing to restart when I add the C# block with this code inside.



Also tried to follow this video - same results -


Help :-)

Btw, I'm trying to do it on localserver, if it matters.
look at logs next time and give to us a screenshot of logs.
Logs should contain details of error information
 

jcknick

Client
Регистрация
10.05.2013
Сообщения
154
Благодарностей
9
Баллы
18
Thanks guys ;-)
 

winlingt

Client
Регистрация
21.10.2021
Сообщения
9
Благодарностей
2
Баллы
3
you may want to check all ref needed for that to run :-)

87432
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)