You can do a post process using 7zip (https://www.7-zip.org/ ). It will give you far greater control over the end result.
7zip command line to add everything in a folder including empty directories to a zip file.
7z a -tzip -mx1 -spf2 {filename}
You can do a post process using 7zip (https://www.7-zip.org/ ). It will give you far greater control over the end result.
7zip command line to add everything in a folder including empty directories to a zip file.
7z a -tzip -mx1 -spf2 {filename}
I don't understand. Let me try to re-explain.
I create a zip file with data called data.zip. Inside are gmls, dwgs... whatever.
I'd like to add an empty folder called Style in data.zip.
I don't understand. Let me try to re-explain.
I create a zip file with data called data.zip. Inside are gmls, dwgs... whatever.
I'd like to add an empty folder called Style in data.zip.
Here's the workflow I follow when I need to include a folder structure in a zip.
Create a batch file;
1. Execute the workbench
2. Create empty directories
3. Zip
4. Remove empty directories
Example batch file run.bat
fme C:\_Fme_Help\empty\empty.fmw
md C:\_Fme_Help\empty\Data\Empty_Folder_1
md C:\_Fme_Help\empty\Data\Empty_Folder_2
md C:\_Fme_Help\empty\Data\Empty_Folder_3
md C:\_Fme_Help\empty\Data\Empty_Folder_nth
7z a -tzip -mx1 c:\_fme_help\empty\test.zip C:\_Fme_Help\empty\Data
rd C:\_Fme_Help\empty\Data\Empty_Folder_1
rd C:\_Fme_Help\empty\Data\Empty_Folder_2
rd C:\_Fme_Help\empty\Data\Empty_Folder_3
rd C:\_Fme_Help\empty\Data\Empty_Folder_nth
Results are a zip file including the empty folders
Other zip programs can add empty folders but 7z is the best for command line.
Here's the workflow I follow when I need to include a folder structure in a zip.
Create a batch file;
1. Execute the workbench
2. Create empty directories
3. Zip
4. Remove empty directories
Example batch file run.bat
fme C:\_Fme_Help\empty\empty.fmw
md C:\_Fme_Help\empty\Data\Empty_Folder_1
md C:\_Fme_Help\empty\Data\Empty_Folder_2
md C:\_Fme_Help\empty\Data\Empty_Folder_3
md C:\_Fme_Help\empty\Data\Empty_Folder_nth
7z a -tzip -mx1 c:\_fme_help\empty\test.zip C:\_Fme_Help\empty\Data
rd C:\_Fme_Help\empty\Data\Empty_Folder_1
rd C:\_Fme_Help\empty\Data\Empty_Folder_2
rd C:\_Fme_Help\empty\Data\Empty_Folder_3
rd C:\_Fme_Help\empty\Data\Empty_Folder_nth
Results are a zip file including the empty folders
Other zip programs can add empty folders but 7z is the best for command line.
This will work for now. I applied a Python shutdown script that basically does what you suggested.
Thank you