Anyone know how to zip a file with a password. I had a topic up a few years ago wanting password protected zips. Now it’s been added but when I tried to use it, it just says the methods signature is not recognized. Here is what it looks like that Im trying to do.
Dim zZipFile As FolderItem = fZipFromFolder
zZipFile.Zip(fZipToFolder, “PasswordHere”)
Thanks for your help.
The Zip method returns a FolderItem and you’re missing parameters.
From the documentation:
'This is an example of zipping SomeFolder on your Desktop:
Var someFolder As FolderItem = SpecialFolder.Desktop.Child("SomeFolder")
Var outputFile As FolderItem = someFolder.Zip
So you’d want something more like:
Var outputFile As FolderItem = fZipFromFolder.Zip(False, FolderItem.ZipCompressions.Normal, "PasswordHere")
Or, if you want to provide the destination:
Var outputFile As FolderItem = fZipFromFolder.Zip(fZipToFolder, False, FolderItem.ZipCompressions.Normal, "PasswordHere")
(This is all browser code and not directly tested, but should help you progress.)