Skip to main content
Solved

Compress features in multiple folder desktop 2018

  • May 17, 2019
  • 3 replies
  • 10 views

Forum|alt.badge.img

Hello community,

I have mutliples raster (jp2 with .tab) in multiples folders like the example below :

folder_name_1

+ -------001.jp2

+ -------001.tab

+ -------002.jp2

+ -------002.tab

folder_name_2

+ -------003.jp2

+ -------003.tab

+ -------003.jp2

+ -------003.tab

 

I want in output zipfiles that contains all files, and which take (as attributes) the name of the folder

fold_name_1.zip (that contains 001.jp2, 002.jp2, 001.tab, 002.tab)

fold_name_2.zip ...

 

I have searched with filewriter, filecopy but i can't make it through.

Have you any advices ?

I work with FME(R) FME Professional Edition 2018.1.0.2

 

Thanks in advance !

 

 

Best answer by takashi

A possible way is:

  1. Read the file paths etc. with the PATH reader.
  2. Extract folder names for each file with the FilenamePartExtractor.
  3. Configure Dataset Fanout on the File Copy writer to archive the source files into zip file whose name is the same as the original folder name.

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.

3 replies

Forum|alt.badge.img
  • Author
  • 2 replies
  • May 17, 2019

Here my attempts.

 

21_2_compress_PROTOTYPE.fmw


takashi
Celebrity
  • 7843 replies
  • Best Answer
  • May 18, 2019

A possible way is:

  1. Read the file paths etc. with the PATH reader.
  2. Extract folder names for each file with the FilenamePartExtractor.
  3. Configure Dataset Fanout on the File Copy writer to archive the source files into zip file whose name is the same as the original folder name.


Forum|alt.badge.img
  • Author
  • 2 replies
  • May 23, 2019

A possible way is:

  1. Read the file paths etc. with the PATH reader.
  2. Extract folder names for each file with the FilenamePartExtractor.
  3. Configure Dataset Fanout on the File Copy writer to archive the source files into zip file whose name is the same as the original folder name.

Thats works, Thanks a lot takashi !

To improve the workflow how about, i made a path on the root_folder (containing all the folder folder_name_n) with option recursivce folder and tadaa !