Forum Discussion
5 Replies
- JackLacava
OneStream Employee
Never done it myself but a quick googling and StackOverflowing shows you should be able to use the libraries System.IO.Compression.Filesystem and System.IO.Compression, which have a ZipFile class. You might have to reference the necessary DLLs in the rule properties though.
- Nikpowar97Contributor
Hi JackLacava ,
You are correct we were missing the dlls (XF\WinSCPnet.dll; C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.IO.Compression.dll; System.IO.Compression.FileSystem.dll) to include the Zip file class. We have used the library System.IO.Compression only. Zipfile class won't give you suggestions but will work as expected,
Dim ZipFileName As String = "Test.zip"
Dim ZipFilePath As String = BRApi.FileSystem.GetFileShareFolder(si, FileShareFolderTypes.ApplicationRoot, Nothing) & "\" & si.AppName.Replace(" ", String.Empty) & "\Groups\" & ZipFileNameZipFile.CreateFromDirectory(exportFolderPath, ZipFilePath). this will store the the files under the folder path, exportFolderPath on the filepath, ZipFilePath.
- Jarek_SadowskiNew Contributor II
Dim ZipFileName As String = "test.zip" Dim folderLocation As String = FileShareFolderHelper.GetDataManagementExportUsernameFolderForApp(si, True, configSettings.FileShareRootFolder, si.AppName) Dim ZipFilePath As String = folderLocation & "\" & ZipFileName XFZip.Zip(ZipFilePath, folderLocation)ZipFile is not working for me. I am working on OneStream on cloud. I think they do not have this library. But I found that they use their own method to zip files.
This is the poorest documentation I have seen ever. I spent hours to find this.
- JackLacava
OneStream Employee
Hey Jarek, I'm sorry you had to suffer through this - we know documentation coverage is not where we'd like them to be, which is partially why this forum exists. Generally speaking, for anything related to "how do I do this thing in Cloud", feel free to chat with Support - chances are someone else had your problems before, and they are happy to make the necessary tweaks. As you can imagine, for security purposes, in Cloud a lot of stuff is not available until you tell us that you really really need it. This is probably one of them.
- Jarek_SadowskiNew Contributor II
Hi Jack,
I fully agree. I hope that this forum is going to grow. I can see you are doing a good job in aim to make it.
Related Content
- 5 months ago
- 1 year ago
- 2 years ago
- 1 year ago