Compress files to .zip format

@igul Can you recreate this in Uipath.

 string[] files= Directory.GetFiles(filePath);
        // Create and open a new ZIP file
                    var zip = ZipFile.Open(fileName, ZipArchiveMode.Create);
                    foreach (var file in files)
                    {
                        // Add the entry for each file
                        zip.CreateEntryFromFile(file, Path.GetFileName(file), CompressionLevel.Optimal);
                    }
                    // Dispose of the object when we are done
                    zip.Dispose();
1 Like