Skip to main content

File Copy writer is often used in conjunction with Directory and File Pathnames reader to move or copy files from one location to another. Directory and File Pathnames reader returns a list of files in a folder and FileCopy writer will process that list.

File Copy Writer allows you to ZIP the entire target folder by simply adding .zip to the folder name on the Destination File Copy Folder parameter, i.e.: D:\\tmp\\filecopy.zip

But what if you want to ZIP each indivdual file that you copy, rather than the entire folder? This is a little burried in the File Copy writer parameters.To ZIP each file that you copy, you can use the Dataset Fanout on the File Copy writer. Fanout expression:

@Value(path_filename).zip

This is configured in the Navigation tree under the FILECOPY writer node, Fanout expression

I've attached the workspace for FME 2018

Although the same thing, I prefer to use the FeatureWriter since I feel it's more intuitive.


The ZipArchiver from FME Hub could also be helpful in some cases.


Reply