Skip to main content

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 !

 

 

Here my attempts.

 

21_2_compress_PROTOTYPE.fmw


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.


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 !

 


Reply