Compress entire folder into ZIP file

Hello,

I want to compress a folder, for example: “C:Test\User” into a zip file. I dont want that the ZIP file contains only the files of that folder, but I have to be able to have the hole folder (the yellow one) in the ZIP content. Can anyone help me?

Check out this post: Compress files to .zip format

There’s a XAML file which will do the work for you.

1 Like

Im still having all files in the ZIP file, but i gotta have the folder. No the files inside the target folder

I Have already tried with and without a slash “” in the end of the path string

Replace the line for assigning the files variable in Compress.xaml with {"<target folder>"} where <target folder> is your directory. By putting this in brackets, you’ll create an array with one item, and the process will zip the folder itself.

The result was an empty ZIP file :frowning:

this is the method you need, passing true in the last parameter:

1 Like