Zipping a folder

I have to zip all the files inside a folder. I don’t to zip that folder.
and I don’t file names.
How do I do it

1 Like

Hi,
you have zip custom activities available. Try installing it/:slight_smile:

I have used it. It is zipping a folder
I want files to be zipped

@KarthikBallary

I think this is work.

  1. Get all file name with system.io.directory.getfiles(“folder path”)
    Directory.GetFiles Method (System.IO) | Microsoft Learn
  2. Use invoke PS to compress
    How to create a zip archive with PowerShell? - Stack Overflow

rgds,

1 Like


I want 1 and 2 to be zipped

z
What I have to enter here? I dont know file names

the files are inside that folder which you need to zip?

yes!!

just give till …\obj\folder . It will zip the entire folder

I dont to zip a folder. If u zip it u will get folder inside folder

1 Like

This activity is showing path cannot be empty

@KarthikBallary,

This is very interesting requirement.

As per what I understand, you can perform the following steps:-

  1. For each item in directory.getfiles(“folder path”)
  2. convert to zip from (“item.tostring”) to (“item.tostring”)

I dont want every file to zip. I wnt grp of files to be zipped.

with zip activity is it possible please send it

Hi @KarthikBallary,

To zip and unzip the folders. you can use this activity…

Regards
Balamurugan.S

I know this activity.But check my requirement

Hi @KarthikBallary,

Yes. you can do it…The marked property is a string array . So you can add more files.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.