Skip to main content
Question

Protected/encrypted ZIP files for FME Server Download Service

  • May 1, 2019
  • 0 replies
  • 16 views

mferwerda3
Contributor
Forum|alt.badge.img+5

Just for information sharing and if anyone has any ideas to improve, the following shutdown python script creates a password protected zip file that works with the FME Server download service.

This use s 7za.exe located in the Resource Data area.

import subprocess

import os

DirectoryToZip = r'$(FME_SERVER_DEST_DIR)'

outzipfilename = (os.path.splitext(r'$(FME_SERVER_DEST_DIR)')[0])+'_z.zip'

ZipPass = str(FME_MacroValues['ZipPass'])

subprocess.call([r"$(FME_SHAREDRESOURCE_DATA)/7za.exe",'a', outzipfilename, DirectoryToZip ,'-mx9','-p'+ZipPass], stdin=None, stdout=None, stderr=None, shell=False)

os.remove(DirectoryToZip)

os.rename(outzipfilename, DirectoryToZip)

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.