Skip to main content

Hi,

Does anybody know how to create a password protected (encrypted) zip file with FME?

Preferably not using the systemcaller (not that protected...)

Any pythonistas out there with a ready example? @takashi @david_r :)

Cheers,

Itay

I don't know any FME solution at this moment.

So, I would promote this to an idea.

I see the use, so I will vote for it.


Thanks, didn't expect a FME solution, hence the hint for a python solution.


As expected python + 7z + awesome colleague (thx poosterveen!) provided the solution as a shutdown script:

import subprocess

OutputZipFile = str(FME_MacroValuess'OutputZipFile'])
DirectoryToZip = str(FME_MacroValuesÂ'DirectoryToZip'])
ZipPass = str(FME_MacroValues 'ZipPass'])

subprocess.call(>r"C:\Program Files\7-Zip\7z.exe",'a', OutputZipFile , DirectoryToZip ,'-mx9','-p'+ZipPass], stdin=None, stdout=None, stderr=None, shell=False)

I don't know any FME solution at this moment.

So, I would promote this to an idea.

I see the use, so I will vote for it.

Done!

 

https://knowledge.safe.com/idea/39057/to-be-able-to-create-password-protected-zipfiles-w.html

 

 


And done as promissed.

 

 


As expected python + 7z + awesome colleague (thx poosterveen!) provided the solution as a shutdown script:

import subprocess

OutputZipFile = str(FME_MacroValuess'OutputZipFile'])
DirectoryToZip = str(FME_MacroValuesÂ'DirectoryToZip'])
ZipPass = str(FME_MacroValues 'ZipPass'])

subprocess.call(>r"C:\Program Files\7-Zip\7z.exe",'a', OutputZipFile , DirectoryToZip ,'-mx9','-p'+ZipPass], stdin=None, stdout=None, stderr=None, shell=False)
How does this substantially differ from using the SystemCaller?

 

In both cases an external program (7-Zip) is called via it's command line.

 

 


Reply